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

You look like you are just about to discover Powershell.


Powershell is how I instrument cross platform CI scripting, with the power of the module concept and manifess now you can write real powerful type safe apis that can run anywhere. It has its quirks though...


Any gotchas with running the same scripts on Windows and Linux? I've been thinking about switching to PowerShell. Love it on Windows. Never tried it on Linux but I did try it on macOS a few years ago and remember some quirks. Currently a bash (over)user.


One gotcha is powershell core has some different apis then the 'windows powershell', best to deploy core on both systems to unify the api.

Also powershell has no support for automatically handling external shell commands that error, you must manually check $LASTEXITCODE (easily done with a custom invoke api that you use for everything).

Also well, some of the escaping in strings is really odd...




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

Search: