Added native min os version blocking
Signed-off-by: paulober <44974737+paulober@users.noreply.github.com>
This commit is contained in:
parent
1990952a62
commit
27262ff5ae
1 changed files with 12 additions and 7 deletions
|
|
@ -7,15 +7,20 @@
|
|||
<installation-check script="installCheck();"/>
|
||||
<script>
|
||||
function installCheck() {
|
||||
if (!(system.compareVersions(system.version.ProductVersion, '12') >= 0)) {
|
||||
my.result.title = 'Unable to install';
|
||||
my.result.message = 'GitHub CLI requires macOS 12 or later.';
|
||||
my.result.type = 'Fatal';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
// this check is redundant, but it produces a user friendly error message
|
||||
// compared to a disabled install button caused by allowed-os-versions
|
||||
if (!(system.compareVersions(system.version.ProductVersion, '12') >= 0)) {
|
||||
my.result.title = 'Unable to install';
|
||||
my.result.message = 'GitHub CLI requires macOS 12 or later.';
|
||||
my.result.type = 'Fatal';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<allowed-os-versions>
|
||||
<os-version min="12.0" />
|
||||
</allowed-os-versions>
|
||||
|
||||
<choices-outline>
|
||||
<line choice="gh-cli"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue