Skip to content

Commit

Permalink
vsx: fix setting the env varible
Browse files Browse the repository at this point in the history
Signed-off-by: vince-fugnitto <[email protected]>
  • Loading branch information
vince-fugnitto committed Oct 28, 2021
1 parent 58a05f4 commit 4207cc1
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,14 @@ export class PluginVsCodeCliContribution implements CliContribution, PluginHostE
conf.option(PluginVsCodeCliContribution.VSCODE_API_VERSION, {
// eslint-disable-next-line max-len
description: `Overrides the version returned by VSCode API 'vscode.version'. Example: --${PluginVsCodeCliContribution.VSCODE_API_VERSION}=<Wanted Version>. Default [${VSCODE_DEFAULT_API_VERSION}]`,
default: VSCODE_DEFAULT_API_VERSION,
type: 'string',
nargs: 1
});
}

setArguments(args: Arguments): void {
const arg = args[PluginVsCodeCliContribution.VSCODE_API_VERSION] as string | undefined;
this.vsCodeApiVersion = arg?.trim() || VSCODE_DEFAULT_API_VERSION;
this.vsCodeApiVersion = arg?.trim() || process.env['VSCODE_API_VERSION']?.trim() || VSCODE_DEFAULT_API_VERSION;
process.env['VSCODE_API_VERSION'] = this.vsCodeApiVersion;
this.vsCodeApiVersionDeferred.resolve(this.vsCodeApiVersion);
}
Expand Down

0 comments on commit 4207cc1

Please sign in to comment.