Closed gfody closed 1 year ago
/dev/null
is only valid in an MSYS2 application. But all MINGW applications are native Windows, so that only NUL
is valid. Similar, if you shell out from ruby, the echo
command of CMD
is executed, which is a native Windows application as well.
In ruby there is a constant for the null device of the running platform. It is File::NULL
or so. Can't test right now...
ah that make sense, so for this project I should try an msys build of ruby instead of mingw (or I can try to make the code more portable w/File::NULL) - thanks!
I'm not sure if this is actually a rubyinstaller or msys problem, as you could code specifically for windows with
> nul
instead of> /dev/null
but ideally this would work as-is..What problems are you experiencing?
Working with ruby code that makes a lot of system calls with the output piped to /dev/null on Windows it's executing something like:
as a workaround I can create a file at
C:\dev\null
but it seems like there could be a better way?Steps to reproduce
What's the output from
ridk version
?I'm using vanilla msys2 and installed ruby from
ci.ri2/mingw-w64-x86_64-ruby27 2.7.7-1