Fix .cmd scripts help arguments#1043
Conversation
ViktorHofer
left a comment
There was a problem hiding this comment.
That won't work with /? (or -?) which was the reason why we introduced the helper checks in the cmd file.
It actually works with |
|
@jkoritzinsky @ViktorHofer could you please review again whenever you have time? |
|
Thanks @jkoritzinsky. will go ahead and merge since @ViktorHofer is OOF already. Viktor let me know if you have any concerns and I will address them as a follow up PR. |
| @@ -57,6 +58,11 @@ if ($MyInvocation.InvocationName -eq ".") { | |||
| exit 0 | |||
| } | |||
There was a problem hiding this comment.
Are we still dot sourcing this script anywhere? If not, we can remove the if block.
There was a problem hiding this comment.
Hmmm I'm not sure about that. I don't think so. Would searching for -Command be enough?
There was a problem hiding this comment.
I'm relatively sure that this is dead code and you can just remove it.
In windows if we call any of the subset helper scripts,
coreclr.cmd,libraries.cmdorinstaller.cmdwith-h, -help or -?we get arcade's help which is miss leading in some arguments like, -arch is shown as -platform. The reason for that is because subset scripts pass-subsetCategory <subset>as the first argument when callingbuild.cmdand inbuild.cmd, in order to print help, we check for%~1.Also without this change, it doesn't match Unix behavior, as if we call
coreclr.sh-hthen we get the expected output of oureng\buildusage output.