dub
dub copied to clipboard
windows: dub won't run if TEMP is unset or empty
trafficstars
System information
- dub version: dub 1.27.0
- OS Platform and distribution: Windows 7 64-bit
- compiler version dmd 2.098.0
Bug Description
if the TEMP environment variable is missing or has an empty value, dub will error out with Environment variable not found on startup
How to reproduce?
in command prompt:
set TEMP=dub --help
Expected Behavior
should work the same as with TEMP=. or with the proper value (C:\Users\qemu\AppData\Local\Temp)
Logs
i'm getting this when running dub through cygwin sshd:
% ssh qemu_win7 'dub --help'
object.Exception@std\process.d(217): Environment variable not found: TEMP
----------------
0x0033C37B
0x0033C132
i think this is the place it's failing:
https://github.com/dlang/dub/blob/4906205/source/dub/commandline.d#L396 (added in 4609540ac1c8bb60f8a575fb7736451b0438c572)
is that workaround still needed? i have no problems running rdmd inside cygwin with TEMP=/tmp (or unset) and all the paths printed by rdmd --dry-run are backslash-separated already