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> {
80
80
81
81
// Call commonArgs on args and append `-gnatef` to generate full file names in errors/warnings
82
82
export 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`
84
85
return p_gnatef ;
85
86
} ;
86
87
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ suite('GPR Tasks Provider', function () {
84
84
const exec = resolved . execution as vscode . ShellExecution ;
85
85
const actualCmd = [ exec . command ] . concat ( exec . args ) . join ( ' ' ) ;
86
86
87
- const expectedCmd = `gprbuild -P ${ def . configuration . projectFile } -cargs -gnatef` ;
87
+ const expectedCmd = `gprbuild -P ${ def . configuration . projectFile } " -cargs:ada" -gnatef` ;
88
88
89
89
assert . strictEqual ( actualCmd , expectedCmd ) ;
90
90
} ) ;
@@ -111,7 +111,7 @@ suite('GPR Tasks Provider', function () {
111
111
112
112
const expectedCmd = `gprbuild -P ${ def . configuration . projectFile } ${
113
113
def . configuration . main ?? ''
114
- } -cargs -gnatef`;
114
+ } " -cargs:ada" -gnatef`;
115
115
116
116
assert . strictEqual ( actualCmd , expectedCmd ) ;
117
117
} ) ;
@@ -140,7 +140,7 @@ suite('GPR Tasks Provider', function () {
140
140
// via project attributes
141
141
const expectedCmd = `gprbuild -P ${ def . configuration . projectFile } ${
142
142
def . configuration . main ?? ''
143
- } -cargs -gnatef && obj/main1exec${ process . platform == 'win32' ? '.exe' : '' } `;
143
+ } " -cargs:ada" -gnatef && obj/main1exec${ process . platform == 'win32' ? '.exe' : '' } `;
144
144
145
145
assert . strictEqual ( actualCmd , expectedCmd ) ;
146
146
} ) ;
You can’t perform that action at this time.
0 commit comments