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

make sure XDG_RUNTIME_DIR exists #555

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# What's New?

## 0.9
Bug Fixes:

- Fix an issue with XDG_RUNTIME_DIR where we tried to reference the directory, but it didn't exist. [#553](https://github.com/microsoft/vscode-makefile-tools/pull/555)

## 0.8
Bug Fixes:
- Fix a bug where the first argument for pre/post-configure args didn't have the proper spacing in front of it [PR #530](https://github.com/microsoft/vscode-makefile-tools/pull/530)
Expand Down
9 changes: 8 additions & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ export function tmpDir(): string {
if (process.platform === 'win32') {
return process.env['TEMP'] || "";
} else {
return process.env['XDG_RUNTIME_DIR'] || '/tmp';
const xdg = process.env['XDG_RUNTIME_DIR'];
if (xdg) {
if (!fs.existsSync(xdg)) {
fs.mkdirSync(xdg);
}
return xdg;
}
return '/tmp';
}
}

Expand Down
Loading