Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: dub won't run if TEMP is unset or empty #2190

Open
huglovefan opened this issue Nov 10, 2021 · 0 comments
Open

windows: dub won't run if TEMP is unset or empty #2190

huglovefan opened this issue Nov 10, 2021 · 0 comments
Labels
good first issue Good for newcomers to fix in a PR

Comments

@huglovefan
Copy link

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:

  1. set TEMP=
  2. 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 4609540)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers to fix in a PR
Projects
None yet
Development

No branches or pull requests

2 participants