forked from external/vscode-xml
Add XQuery Execution
This commit is contained in:
parent
0b4ccf8956
commit
98028898ac
5 changed files with 105 additions and 2 deletions
23
src/services/ChildProcess.ts
Normal file
23
src/services/ChildProcess.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
let child_process = require('child_process');
|
||||
|
||||
export class ChildProcess {
|
||||
static async spawnAsync(executable: string, args: string[]): Promise<void> {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
|
||||
let handle = child_process.spawn(executable, args);
|
||||
|
||||
handle.on('close', (code: string) => {
|
||||
if (code == '0') {
|
||||
resolve();
|
||||
}
|
||||
|
||||
else {
|
||||
reject(code);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue