File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -17,21 +17,26 @@ function getSln(workspacePath: string): string | undefined {
17
17
18
18
async function main ( ) {
19
19
try {
20
- const vscodeExecutablePath = await downloadAndUnzipVSCode ( '1.92.2 ' ) ;
20
+ const vscodeExecutablePath = await downloadAndUnzipVSCode ( 'stable ' ) ;
21
21
const [ cli , ...args ] = resolveCliArgsFromVSCodeExecutablePath ( vscodeExecutablePath ) ;
22
22
23
23
console . log ( 'Display: ' + process . env . DISPLAY ) ;
24
24
25
25
const fullArgs = [ ...args , '--install-extension' , 'ms-dotnettools.vscode-dotnet-runtime' ] ;
26
- console . log ( fullArgs ) ;
27
- const result = cp . spawnSync ( cli , fullArgs , {
26
+
27
+ // Since we're using shell execute, spaces in the CLI path will get interpeted as args
28
+ // Therefore we wrap the CLI path in quotes as on MacOS the path can contain spaces.
29
+ const cliWrapped = `"${ cli } "` ;
30
+ console . log ( `${ cliWrapped } ${ fullArgs } ` ) ;
31
+
32
+ const result = cp . spawnSync ( cliWrapped , fullArgs , {
28
33
encoding : 'utf-8' ,
29
34
stdio : 'inherit' ,
30
35
// Workaround as described in https://github.com/nodejs/node/issues/52554
31
36
shell : true ,
32
37
} ) ;
33
- if ( result . error ) {
34
- throw new Error ( `Failed to install the runtime extension: ${ result . error } ` ) ;
38
+ if ( result . error || result . status !== 0 ) {
39
+ throw new Error ( `Failed to install the runtime extension: ${ JSON . stringify ( result ) } ` ) ;
35
40
}
36
41
37
42
// The folder containing the Extension Manifest package.json
You can’t perform that action at this time.
0 commit comments