Skip to content

Commit bc0f1d7

Browse files
tomchenHerringtonDarkholme
authored andcommitted
fix: testBinaryExist space
when command contains space, testBinaryExist() will fail, but the extension actually works
1 parent e2a311d commit bc0f1d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension/common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ export function resolveBinary() {
4040
}
4141

4242
export async function testBinaryExist(command: string) {
43+
const _command = /\s/.test(command.trim()) ? `"${command}"` : command
4344
const uris = workspace.workspaceFolders?.map(i => i.uri?.fsPath) ?? []
4445
return new Promise(r => {
4546
execFile(
46-
command,
47+
_command,
4748
['-h'],
4849
{
4950
// for windows

0 commit comments

Comments
 (0)