Skip to content

Commit

Permalink
Make extension work on Windows (#86)
Browse files Browse the repository at this point in the history
Previously `childProcess.spawn` was failing on Windows due to invalid path format in `cwd` argument
Use `Uri.fsPath` (instead of `Uri.path`) which provides correct (platform specific) file paths

Co-authored-by: Taylor Fausak <taylor@fausak.me>
  • Loading branch information
EduardSergeev and tfausak authored Jun 22, 2024
1 parent 9ae5558 commit 503f3b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ async function formatDocumentRange(
}

const command = expandTemplate(template, { file });
const cwd = rootUri.path;
const cwd = rootUri.fsPath;
log(
channel,
key,
Expand Down Expand Up @@ -813,7 +813,7 @@ async function lintHaskell(
}

const command = expandTemplate(HASKELL_LINTER_TEMPLATE, { file });
const cwd = rootUri.path;
const cwd = rootUri.fsPath;
log(
channel,
key,
Expand Down Expand Up @@ -1054,7 +1054,7 @@ async function startInterpreter(

updateStatus(status, true, vscode.LanguageStatusSeverity.Information, "Starting");

const cwd = rootUri.path;
const cwd = rootUri.fsPath;
log(
channel,
key,
Expand Down

0 comments on commit 503f3b5

Please sign in to comment.