The 2 > nul hack on Windows is only there for using within a cmd.exe
console. Current Makefile does only work within git bash (or wsl) on
Windows, and they make a "nul" file appear as bash does not handle this
redirection with anything special.
Worse, nul is actually a reserved name on Windows, and most APIs can't
manipulate a file named nul (and thus to remove it, you must either
run git bash or wsl).
As both WSL and git bash allow to redirect to /dev/null, this PR treats
Windows in the same way as Unix.
The 2 > nul hack on Windows is only there for using within a cmd.exe console. Current Makefile does only work within git bash (or wsl) on Windows, and they make a "nul" file appear as bash does not handle this redirection with anything special.
Worse,
nul
is actually a reserved name on Windows, and most APIs can't manipulate a file namednul
(and thus to remove it, you must either run git bash or wsl).As both WSL and git bash allow to redirect to /dev/null, this PR treats Windows in the same way as Unix.
Signed-off-by: Simon Ferquel simon.ferquel@docker.com