Skip to content

Commit 41085cf

Browse files
Mac/Linux and logic fixes
1 parent 2c2ffb2 commit 41085cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/yarnpkg-sdks/sources/sdks/vscode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ export const VSCODE_SDKS: IntegrationSdks = [
180180

181181
async function getVSCodeVersion() {
182182
try {
183-
const command = `code${process.platform === `win32` && `.cmd`} --version`;
184-
const {stdout} = await sdkUtils.execPromise(`${command} --version`, {encoding: `utf8`, shell: `cmd.exe`});
183+
const command = `code${process.platform === `win32` ? `.cmd` : ``} --version`;
184+
const {stdout} = await sdkUtils.execPromise(command, {encoding: `utf8`});
185185
const version = stdout.split(`\n`)[0].trim();
186186
return version.split(`.`).map(value => parseInt(value, 10));
187187
} catch {

0 commit comments

Comments
 (0)