Skip to content

Commit

Permalink
chore: add electron-build-tools.show.exec command
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Jan 29, 2025
1 parent 71d6b64 commit e598663
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
"name": "Electron: C++ (Windows)",
"type": "cppvsdbg",
"request": "launch",
"program": "${command:electron-build-tools.show.exe}",
"program": "${command:electron-build-tools.show.exec}",
"args": [],
"stopAtEntry": false,
"cwd": "${command:electron-build-tools.show.root}\\src",
Expand Down Expand Up @@ -304,7 +304,7 @@
{
"type": "cppdbg",
"request": "launch",
"program": "${command:electron-build-tools.show.exe}",
"program": "${command:electron-build-tools.show.exec}",
"args": [],
"stopAtEntry": false,
"cwd": "${command:electron-build-tools.show.root}/src",
Expand Down
6 changes: 6 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ function registerElectronBuildToolsCommands(
});
return stdout.trim();
}),
vscode.commands.registerCommand(`${commandPrefix}.show.exec`, async () => {
const { stdout } = await exec(`${buildToolsExecutable} show exec`, {
encoding: "utf8",
});
return stdout.trim();
}),
vscode.commands.registerCommand(
`${commandPrefix}.show.out.path`,
async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ async function getElectronTests(
await setupSpecRunner(electronRoot.fsPath);

const electronExe = await vscode.commands.executeCommand<string>(
`${commandPrefix}.show.exe`,
`${commandPrefix}.show.exec`,
);
const scriptName = context.asAbsolutePath("out/electron/listMochaTests.js");
const tsNodeCompiler = context.asAbsolutePath(
Expand Down

0 comments on commit e598663

Please sign in to comment.