Skip to content

Call fs.promises.mkdtemp on the correct path to prevent making a temp dir in $HOME #529

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

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

anthowan
Copy link
Contributor

@anthowan anthowan commented Apr 4, 2025

When using a custom Dafny installation, this extension copies it to a temp directory. However, the mkdtemp call has a typo where it uses vscode-dafny-dlls-' instead of path.join(os.tmpdir(), 'vscode-dafny-dlls-'), which causes the temp directory to appear in VSCode's cwd (in my case $HOME). This PR fixes that.

https://nodejs.org/api/fs.html#fspromisesmkdtempprefix-options also has an example of how to correctly use mkdtemp.

@keyboardDrummer keyboardDrummer merged commit 4c532ef into dafny-lang:master Apr 7, 2025
2 checks passed
@keyboardDrummer
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants