Closed krishean closed 1 year ago
os.devnull is the /dev/null device on the current platform, but that might not be any easier to integrate.
Could do something like:
if os.devnull != "/dev/null" and "/dev/null" in self.arguments:
self.arguments = [os.devnull if arg == "/dev/null" else arg for arg in self.arguments]
to remove the explicit win32 check, but it's roughly the same in either case, macos uses /dev/null as well, windows is the only os that uses a different device name as far as I'm aware, even cygwin and msys2 have code to allow /dev/null to work on windows.
We could just create a new empty file in testfiles/
and use that instead of /dev/null
I wouldn't have thought to do it that way, a much simpler way to fix it.
On windows test 114 (
trurl.exe -f /dev/null --json
) fails because the null device is called just "nul"This could potentially be fixed by adding:
below line 52 in test.py: https://github.com/curl/trurl/blob/c1bd6b8e30b428ee79cccdcffa2d87fa33b95dff/test.py#L52
There may be a better way to do this, if so I'm open to suggestions, otherwise I can submit a pull request.