[Feature] Shell Implementation should accept NUL (nul) as null device for redirection #4028
Labels
enhancement
New feature or request
stale
Issues that didn't get attention
waiting for feedback
Will autoclose in a while unless more data are provided
Describe the user story
yarn has a "bash like" internal shell for scripts in package.json. This shell tries to be "cross platform". As such it handles "/dev/null" to ignore standard output of commands. However, on Windows, /dev/null does not exist.
There is a need of Windows only scripts: Since there's no external or builtin cp command, "xcopy" or "cmd /c copy" must be used on Windows. It looks weird to redirect its output to /dev/null in such circumstances. Also there's no benefit (in terms of crossplatform), since the script will not work on Linux or Mac anyway.
Describe the solution you'd like
The integrated shell should use "NUL" (case independent) as an alias to /dev/null, and treat it alike.
Describe the drawbacks of your solution
There would be no way to redirect standard output/error to a file called "nul" on Linux/Mac.
Describe alternatives you've considered
None.
The text was updated successfully, but these errors were encountered: