Skip to content

Commit 83ce4fe

Browse files
committed
Merge branch 'topic/vscode-testing' into 'master'
Fix VS Code extension on Windows See merge request eng/ide/ada_language_server!1263
2 parents 57d78d4 + d280727 commit 83ce4fe

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

integration/vscode/ada/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/vscode/ada/src/extension.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ function createClient(
196196
);
197197
}
198198

199+
if (process.platform == 'win32') {
200+
// Add the extension for the file lookup further below
201+
serverExecPath = `${serverExecPath}.exe`;
202+
}
203+
199204
// If the ALS environment variable is specified, use it as the path of the
200205
// server executable.
201206
if (process.env.ALS) {

integration/vscode/ada/test/suite/highlighting.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,11 @@ function testSyntaxHighlighting(absFilePath: string, syntax: Syntaxes) {
242242
}
243243

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

0 commit comments

Comments
 (0)