Skip to content

Commit

Permalink
use fork instead of spawn
Browse files Browse the repository at this point in the history
Signed-off-by: Eyal Barlev <eyal.barlev@sap.com>
  • Loading branch information
perspectivus1 committed Jun 18, 2019
1 parent 5c7fbc8 commit 9da6e83
Showing 1 changed file with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,22 @@ export abstract class AbstractVSCodeDebugAdapterContribution implements DebugAda
if (runtime && runtime.indexOf('./') === 0) {
runtime = path.join(this.extensionPath, runtime);
}

const runtimeArgs = info && info.runtimeArgs || contribution.runtimeArgs || [];
const command = runtime ? runtime : program;
const args = runtime ? [...runtimeArgs, program, ...programArgs] : programArgs;
return {
command,
args
};
if (runtime === 'node') {
const modulePath = program;
const args = [...runtimeArgs, ...programArgs];
return {
modulePath,
args
};
} else {
const command = runtime ? runtime : program;
const args = runtime ? [...runtimeArgs, program, ...programArgs] : programArgs;
return {
command,
args
};
}
}
}

0 comments on commit 9da6e83

Please sign in to comment.