cnabio / cnab-to-oci

Tool to convert CNAB bundle.json to OCI index
Apache License 2.0
54 stars 41 forks source link

Don't write a `nul` file on Windows #28

Closed simonferquel closed 5 years ago

simonferquel commented 5 years ago

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.

Signed-off-by: Simon Ferquel simon.ferquel@docker.com