Skip to content

Commit

Permalink
debug: only get workspace to resolve agains for user launch
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Feb 13, 2018
1 parent 1287a5d commit f88bbf9
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,13 +588,17 @@ class Launch implements ILaunch {

// massage configuration attributes - append workspace path to relatvie paths, substitute variables in paths.
Object.keys(result).forEach(key => {
result[key] = this.configurationResolverService.resolveAny(this.workspace, result[key]);
result[key] = this.configurationResolverService.resolveAny(this.getWorkspaceForResolving(), result[key]);
});

const adapter = this.configurationManager.getAdapter(result.type);
return this.configurationResolverService.resolveInteractiveVariables(result, adapter ? adapter.variables : null);
}

protected getWorkspaceForResolving(): IWorkspaceFolder {
return this.workspace;
}

public openConfigFile(sideBySide: boolean, type?: string): TPromise<IEditor> {
const resource = this.uri;
let pinned = false;
Expand Down Expand Up @@ -690,9 +694,9 @@ class UserLaunch extends Launch implements ILaunch {
@IConfigurationService configurationService: IConfigurationService,
@IConfigurationResolverService configurationResolverService: IConfigurationResolverService,
@IPreferencesService private preferencesService: IPreferencesService,
@IWorkspaceContextService contextService: IWorkspaceContextService
@IWorkspaceContextService private contextService: IWorkspaceContextService
) {
super(configurationManager, contextService.getWorkbenchState() === WorkbenchState.FOLDER ? contextService.getWorkspace().folders[0] : undefined, fileService, editorService, configurationService, configurationResolverService);
super(configurationManager, undefined, fileService, editorService, configurationService, configurationResolverService);
}

get uri(): uri {
Expand All @@ -703,6 +707,10 @@ class UserLaunch extends Launch implements ILaunch {
return nls.localize('user settings', "user settings");
}

protected getWorkspaceForResolving(): IWorkspaceFolder {
return this.contextService.getWorkbenchState() === WorkbenchState.FOLDER ? this.contextService.getWorkspace().folders[0] : undefined;
}

public get hidden(): boolean {
return true;
}
Expand Down

0 comments on commit f88bbf9

Please sign in to comment.