Skip to content

Commit

Permalink
debug: drop support for variable substition for program and runtime i…
Browse files Browse the repository at this point in the history
…n package.json

fixes #31675
  • Loading branch information
isidorn committed Aug 3, 2017
1 parent 754b68a commit 064efc9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/vs/workbench/parts/debug/node/debugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export class Adapter {
}

const adapterExecutable = <IAdapterExecutable>{
command: this.getProgram(root),
command: this.getProgram(),
args: this.getAttributeBasedOnPlatform('args')
};
const runtime = this.getRuntime(root);
const runtime = this.getRuntime();
if (runtime) {
const runtimeArgs = this.getAttributeBasedOnPlatform('runtimeArgs');
adapterExecutable.args = (runtimeArgs || []).concat([adapterExecutable.command]).concat(adapterExecutable.args || []);
Expand Down Expand Up @@ -82,19 +82,17 @@ export class Adapter {
"Cannot determine executable for debug adapter '{0}'.", details.command)));
}

private getRuntime(root: uri): string {
private getRuntime(): string {
let runtime = this.getAttributeBasedOnPlatform('runtime');
if (runtime && runtime.indexOf('./') === 0) {
runtime = root ? this.configurationResolverService.resolve(root, runtime) : runtime;
runtime = paths.join(this.extensionDescription.extensionFolderPath, runtime);
}
return runtime;
}

private getProgram(root: uri): string {
private getProgram(): string {
let program = this.getAttributeBasedOnPlatform('program');
if (program) {
program = root ? this.configurationResolverService.resolve(root, program) : program;
program = paths.join(this.extensionDescription.extensionFolderPath, program);
}
return program;
Expand Down

0 comments on commit 064efc9

Please sign in to comment.