Skip to content

Commit ae6744a

Browse files
authored
Print help for -? and /? cross-plat (dotnet#42396)
* Print help for -? and /? cross-plat
1 parent 7c3d238 commit ae6744a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

build.cmd

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ setlocal
33

44
set _args=%*
55
if "%~1"=="-?" set _args=-help
6+
if "%~1"=="/?" set _args=-help
67

78
powershell -ExecutionPolicy ByPass -NoProfile -Command "& '%~dp0eng\build.ps1'" %_args%
89
exit /b %ERRORLEVEL%

eng/build.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function Get-Help() {
103103
Write-Host "For more information, check out https://github.com/dotnet/runtime/blob/master/docs/workflow/README.md"
104104
}
105105

106-
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
106+
if ($help) {
107107
Get-Help
108108
exit 0
109109
}

eng/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ while [[ $# > 0 ]]; do
172172
firstArgumentChecked=1
173173

174174
case "$opt" in
175-
-help|-h)
175+
-help|-h|-\?|/?)
176176
usage
177177
exit 0
178178
;;

0 commit comments

Comments
 (0)