File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ async function computeProject(taskDef?: CustomTaskDefinition): Promise<string> {
8080
8181// Call commonArgs on args and append `-gnatef` to generate full file names in errors/warnings
8282export const getDiagnosticArgs = ( ) : string [ ] => {
83- const p_gnatef = [ '-cargs:ada' , '-gnatef' ] ;
83+ const p_gnatef = [ '"-cargs:ada"' , '-gnatef' ] ;
84+ // PowerShell splits arguments on `:`, so we need extra quotes around `-cargs:ada`
8485 return p_gnatef ;
8586} ;
8687
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ suite('GPR Tasks Provider', function () {
8484 const exec = resolved . execution as vscode . ShellExecution ;
8585 const actualCmd = [ exec . command ] . concat ( exec . args ) . join ( ' ' ) ;
8686
87- const expectedCmd = `gprbuild -P ${ def . configuration . projectFile } -cargs -gnatef` ;
87+ const expectedCmd = `gprbuild -P ${ def . configuration . projectFile } " -cargs:ada" -gnatef` ;
8888
8989 assert . strictEqual ( actualCmd , expectedCmd ) ;
9090 } ) ;
@@ -111,7 +111,7 @@ suite('GPR Tasks Provider', function () {
111111
112112 const expectedCmd = `gprbuild -P ${ def . configuration . projectFile } ${
113113 def . configuration . main ?? ''
114- } -cargs -gnatef`;
114+ } " -cargs:ada" -gnatef`;
115115
116116 assert . strictEqual ( actualCmd , expectedCmd ) ;
117117 } ) ;
@@ -140,7 +140,7 @@ suite('GPR Tasks Provider', function () {
140140 // via project attributes
141141 const expectedCmd = `gprbuild -P ${ def . configuration . projectFile } ${
142142 def . configuration . main ?? ''
143- } -cargs -gnatef && obj/main1exec${ process . platform == 'win32' ? '.exe' : '' } `;
143+ } " -cargs:ada" -gnatef && obj/main1exec${ process . platform == 'win32' ? '.exe' : '' } `;
144144
145145 assert . strictEqual ( actualCmd , expectedCmd ) ;
146146 } ) ;
You can’t perform that action at this time.
0 commit comments