Skip to content

Commit dd92edb

Browse files
authored
Merge pull request #74 from johnsonwj/os-tmpdir
Use os.tmpdir()
2 parents ca954e6 + 71a749b commit dd92edb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,14 @@ function activateHieNoCheck(context: ExtensionContext, folder: WorkspaceFolder,
144144
const serverPath =
145145
useCustomWrapper || hieExecutablePath ? startupScript : context.asAbsolutePath(path.join('.', startupScript));
146146

147-
const tempDir = process.platform === 'win32' ? '%TEMP%' : '/tmp';
147+
const tempDir = os.tmpdir();
148148
const runArgs = [];
149149
const debugArgs = ['-d', '-l', path.join(tempDir, 'hie.log')];
150150
if (!useCustomWrapper && !useHieWrapper && hieExecutablePath !== '') {
151151
runArgs.unshift('--lsp');
152152
debugArgs.unshift('--lsp');
153153
}
154+
154155
// If the extension is launched in debug mode then the debug server options are used,
155156
// otherwise the run options are used.
156157
const serverOptions: ServerOptions = {

0 commit comments

Comments
 (0)