4 ms·
As long as they're single commands. Running multiple commands using `&&`, etc. is unfortunately not portable.
by Arnavion 11y ago
As long as they're single commands. Running multiple commands using `&&`, etc. is unfortunately not portable.
- jdmichal 11y agoWhat platform does `&&` not work on? It works fine in Windows `cmd`, which is the typical shell to worry about portability with.
- Arnavion 11y agocmd's `&&` is the equivalent of bash's `;`. bash's `&&` has no equivalent in cmd. Edit: Never mind, I'm apparently wrong.
- jdmichal 11y agoOn Windows 7; note the lack of version information from Java: > rm test.txt && java -version rm: cannot unlink entry "test.txt": The system cannot find the file specified.
- joshuacc 11y agoThat's not correct. I use npm scripts with `&&` on Windows many times per day. Other features may not be portable, but that one definitely is.
- Arnavion 11y agoSee https://news.ycombinator.com/item?id=11061056 https://news.ycombinator.com/item?id=11061056