Skip to content

Commit

Permalink
Fixing Windows test running
Browse files Browse the repository at this point in the history
  • Loading branch information
khawkins authored and ben-zhang-at-salesforce committed Jun 24, 2024
1 parent 792857c commit 44cbeb8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/test/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ async function main() {
// support in the `engines` section of our package.
const vscodeExecutablePath =
await downloadAndUnzipVSCode(VSCODE_TEST_VERSION);
const [cliPath, ...args] =
const [cliPath, ...cliArgs] =
resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);

// Install the Salesforce Extensions, which is a pre-req for our
// extension. Bail if there's an error.
const isWindows = process.platform === 'win32';
const installExtensionDepsOuput = spawnSync(
cliPath,
[...args, '--install-extension', CORE_EXTENSION_ID],
{ stdio: 'inherit', encoding: 'utf-8' }
isWindows ? `"${cliPath}"` : cliPath,
[...cliArgs, '--install-extension', CORE_EXTENSION_ID],
{ stdio: 'inherit', encoding: 'utf-8', shell: isWindows }
);
if (installExtensionDepsOuput.error) {
console.error(
Expand Down

0 comments on commit 44cbeb8

Please sign in to comment.