Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And it is so wonderously mistaken in assigning a boolean type to $?.

I really cannot fathom how this could be, as Microsoft bundles curl, which has nearly 100 exit codes on various types of failure.

Whoever made this language decision needs to explain themselves.



> And it is so wonderously mistaken in assigning a boolean type to $?

Use $LASTEXITCODE for native executables, and $? for PowerShell cmdlets.

https://learn.microsoft.com/en-us/powershell/module/microsof...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: