Print help for -? and /? cross-plat (#42396)
authorViktor Hofer <viktor.hofer@microsoft.com>
Thu, 24 Sep 2020 12:27:24 +0000 (14:27 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Sep 2020 12:27:24 +0000 (14:27 +0200)
* Print help for -? and /? cross-plat

build.cmd
eng/build.ps1
eng/build.sh

index 76f4d84..fd4aba3 100644 (file)
--- a/build.cmd
+++ b/build.cmd
@@ -3,6 +3,7 @@ setlocal
 
 set _args=%*
 if "%~1"=="-?" set _args=-help
+if "%~1"=="/?" set _args=-help
 
 powershell -ExecutionPolicy ByPass -NoProfile -Command "& '%~dp0eng\build.ps1'" %_args%
 exit /b %ERRORLEVEL%
index 016ed15..393ed84 100644 (file)
@@ -103,7 +103,7 @@ function Get-Help() {
   Write-Host "For more information, check out https://github.com/dotnet/runtime/blob/master/docs/workflow/README.md"
 }
 
-if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
+if ($help) {
   Get-Help
   exit 0
 }
index 47c0296..bbd1ac3 100755 (executable)
@@ -172,7 +172,7 @@ while [[ $# > 0 ]]; do
   firstArgumentChecked=1
 
   case "$opt" in
-     -help|-h)
+     -help|-h|-\?|/?)
       usage
       exit 0
       ;;