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

Portable tmp should set %tmp% also #83998

Closed
gilescope opened this issue Nov 5, 2019 · 5 comments
Closed

Portable tmp should set %tmp% also #83998

gilescope opened this issue Nov 5, 2019 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug portable-mode VS Code portable mode issues verified Verification succeeded windows VS Code on Windows issues
Milestone

Comments

@gilescope
Copy link

It’s great that having a data/tmp dir redirects the %TEMP% env var, but it would be great if it also redirects %TMP% also as building unix-like stuff on windows can often rely on %tmp%.

By setting both you cover all cases and have happier users as more stuff works first time.

@joaomoreno
Copy link
Member

This sounds like a feature for terminal, tasks & debug, or wherever we spawn processes from.

@Tyriar
Copy link
Member

Tyriar commented Nov 6, 2019

@joaomoreno doesn't it make more sense to set this on the main process' environment instead of special casing something for portable in several different features?

@joaomoreno joaomoreno assigned joaomoreno and unassigned isidorn, Tyriar and alexr00 Nov 7, 2019
@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Nov 7, 2019
@joaomoreno
Copy link
Member

🤔 My bad... this is actually implemented:

process.env[process.platform === 'win32' ? 'TEMP' : 'TMPDIR'] = portableTempPath;

image

@gilescope In Windows, the TEMP directory should be redirected, don't you see that behavior?

@gilescope
Copy link
Author

I do see TEMP dir is redirected. cargo install cargo-watch is what's running foul and digging into the issue it seems that rust checks 'TMP' env before checking 'TEMP'. It does this in accordence with: https://docs.microsoft.com/en-gb/windows/win32/api/fileapi/nf-fileapi-gettemppatha

My suggestion for peace and harmony is to remove the OS check and redirect both TMP and TEMP on all OSes.

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug portable-mode VS Code portable mode issues and removed info-needed Issue requires more information from poster labels Nov 11, 2019
@joaomoreno joaomoreno added this to the November 2019 milestone Nov 11, 2019
@joaomoreno joaomoreno added the windows VS Code on Windows issues label Nov 11, 2019
@gilescope
Copy link
Author

gilescope commented Nov 17, 2019 via email

@roblourens roblourens added the verified Verification succeeded label Dec 5, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug portable-mode VS Code portable mode issues verified Verification succeeded windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

6 participants