@@ -143,7 +143,7 @@ export class SaxonJsTaskProvider implements vscode.TaskProvider {
143
143
let xsltParameters : XSLTParameter [ ] = xsltTask . parameters ? xsltTask . parameters : [ ] ;
144
144
let xsltParametersCommand : string [ ] = [ ]
145
145
for ( const param of xsltParameters ) {
146
- xsltParametersCommand . push ( '"' + param . name + '=' + param . value + '"' ) ;
146
+ xsltParametersCommand . push ( param . name + '=' + param . value ) ;
147
147
}
148
148
149
149
for ( const propName in xsltTask ) {
@@ -170,25 +170,19 @@ export class SaxonJsTaskProvider implements vscode.TaskProvider {
170
170
break ;
171
171
}
172
172
if ( propNameValue !== '' ) {
173
- const escapedArg = SaxonTaskProvider . escapeString2 ( propNameValue ) ;
174
- commandLineArgs . push ( escapedArg ) ;
173
+ commandLineArgs . push ( propNameValue ) ;
175
174
}
176
175
}
177
176
178
177
let nodeModulesPath = xsltTask . nodeModulesFolder + path . sep + '.bin' + path . sep ;
179
178
180
- if ( xsltParametersCommand . length > 0 ) {
181
- commandLineArgs . push ( xsltParametersCommand . join ( ' ' ) ) ;
182
- }
183
-
184
- let resolvedCommandLine = commandLineArgs . join ( ' ' ) ;
185
179
// this is overriden if problemMatcher is set in the tasks.json file
186
180
let problemMatcher = "$saxon-xslt-js" ;
187
- let escapedModulesPath = SaxonTaskProvider . escapeString ( nodeModulesPath + 'xslt3' ) ;
188
- let commandline = ` ${ escapedModulesPath } ${ resolvedCommandLine } ` ;
189
- console . log ( 'commandline:' ) ;
190
- console . log ( commandline ) ;
191
- let newTask = new vscode . Task ( xsltTask , xsltTask . label , source , new vscode . ShellExecution ( commandline ) , problemMatcher ) ;
181
+
182
+ const processExecution = new vscode . ProcessExecution ( nodeModulesPath + 'xslt3' , commandLineArgs . concat ( xsltParametersCommand ) ) ;
183
+ let newTask = new vscode . Task ( xsltTask , xsltTask . label , source , processExecution , problemMatcher ) ;
184
+
185
+ // let newTask = new vscode.Task(xsltTask, xsltTask.label, source, new vscode.ShellExecution(commandline), problemMatcher);
192
186
return newTask ;
193
187
} else {
194
188
return undefined ;
0 commit comments