StefanMaron / vsc-lintercop

MIT License
6 stars 6 forks source link

Improve handling on $prerelease parameter #14

Closed Arthurvdv closed 4 months ago

Arthurvdv commented 7 months ago

image This format of the input parameter doesn't support $false, where it will result in the value true.

With this PR I've improved the validation of the -prerelease flag.

DownloadFile.ps1 -TargetPath ""
DownloadFile.ps1 -TargetPath "" -prerelease false
DownloadFile.ps1 -TargetPath "" -prerelease False
DownloadFile.ps1 -TargetPath "" -prerelease $False
DownloadFile.ps1 -TargetPath "" -prerelease SomeRandomValue

These examples will download the Latest version.

DownloadFile.ps1 -TargetPath "" -prerelease true
DownloadFile.ps1 -TargetPath "" -prerelease True
DownloadFile.ps1 -TargetPath "" -prerelease $True

These examples will download the Pre-release version.

More details on https://github.com/StefanMaron/BusinessCentral.LinterCop/issues/500.

pri-kise commented 4 months ago

@StefanMaron can this PR be please approved and merged?