@@ -8,6 +8,7 @@ import * as vscode from 'vscode';
8
8
import * as path from 'path' ;
9
9
import * as fs from 'fs' ;
10
10
import { SaxonTaskProvider } from './saxonTaskProvider' ;
11
+ import { DocumentChangeHandler } from './documentChangeHandler' ;
11
12
12
13
function exists ( file : string ) : Promise < boolean > {
13
14
return new Promise < boolean > ( ( resolve , _reject ) => {
@@ -139,6 +140,7 @@ export class SaxonJsTaskProvider implements vscode.TaskProvider {
139
140
this . templateTaskFound = true ;
140
141
}
141
142
143
+ let npxCommand = DocumentChangeHandler . isWindowsOS ? 'npx.cmd' : 'npx' ;
142
144
let commandLineArgs : string [ ] = [ 'xslt3' ] ;
143
145
144
146
let xsltParameters : XSLTParameter [ ] = xsltTask . parameters ? xsltTask . parameters : [ ] ;
@@ -184,7 +186,7 @@ export class SaxonJsTaskProvider implements vscode.TaskProvider {
184
186
// this is overriden if problemMatcher is set in the tasks.json file
185
187
let problemMatcher = "$saxon-xslt-js" ;
186
188
187
- const processExecution = new vscode . ProcessExecution ( 'npx' , commandLineArgs . concat ( xsltParametersCommand ) ) ;
189
+ const processExecution = new vscode . ProcessExecution ( npxCommand , commandLineArgs . concat ( xsltParametersCommand ) ) ;
188
190
let newTask = new vscode . Task ( xsltTask , xsltTask . label , source , processExecution , problemMatcher ) ;
189
191
190
192
//let newTask = new vscode.Task(xsltTask, xsltTask.label, source, new vscode.ShellExecution(commandline), problemMatcher);
0 commit comments