Skip to content

Commit

Permalink
Fix VS Code extension and testing on Windows
Browse files Browse the repository at this point in the history
For eng/ide/ada_language_server#1150
  • Loading branch information
eliericha committed Jul 12, 2023
1 parent 57d78d4 commit d280727
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions integration/vscode/ada/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions integration/vscode/ada/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ function createClient(
);
}

if (process.platform == 'win32') {
// Add the extension for the file lookup further below
serverExecPath = `${serverExecPath}.exe`;
}

// If the ALS environment variable is specified, use it as the path of the
// server executable.
if (process.env.ALS) {
Expand Down
7 changes: 5 additions & 2 deletions integration/vscode/ada/test/suite/highlighting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,11 @@ function testSyntaxHighlighting(absFilePath: string, syntax: Syntaxes) {
}

const cmd = [
// Use npx to avoid sensitivity to PATH env var
'npx',
// Use npx to avoid sensitivity to PATH env var. On Windows, the
// Node installation provides a 'npx' executable file which is a
// Bash script which doesn't work on Windows. Instead on Windows,
// the 'npx.cmd' file should be used.
process.platform == 'win32' ? 'npx.cmd' : 'npx',
'vscode-tmgrammar-snap',
// We pass a non-existing language configuration, otherwise the tool
// picks up the package.json file and always loads the grammar in
Expand Down

0 comments on commit d280727

Please sign in to comment.