From f925bdb18160ecdfebc77f7bba96660d24435e28 Mon Sep 17 00:00:00 2001 From: Stefan Dirix Date: Tue, 24 Jan 2023 11:37:04 +0100 Subject: [PATCH] Fix 'pickString' evaluation (#12100) Similar to 'promptString', 'pickString' can be used to replace variables in task and launch configurations. However 'pickString' values were not correctly handled which prevented them from being evaluated. This is now fixed. Fixes #11585 Contributed on behalf of STMicroelectronics --- CHANGELOG.md | 1 + .../src/browser/common-variable-contribution.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e5d9fb8673e6..e7800ed0bcb25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - [plugin] added support for `isTransient` of `TerminalOptions` and `ExternalTerminalOptions` VS Code API [#12055](https://github.com/eclipse-theia/theia/pull/12055) - Contributed on behalf of STMicroelectronics - [terminal] added support for preference `terminal.integrated.enablePersistentSessions` to allow disabling restoring terminals on reload [#12055](https://github.com/eclipse-theia/theia/pull/12055) - Contributed on behalf of STMicroelectronics +- [variable-resolver] fixed evaluations of `pickString` variables [#12100](https://github.com/eclipse-theia/theia/pull/12100) - Contributed on behalf of STMicroelectronics [Breaking Changes:](#breaking_changes_1.34.0) diff --git a/packages/variable-resolver/src/browser/common-variable-contribution.ts b/packages/variable-resolver/src/browser/common-variable-contribution.ts index 593ea18d3eb44..ffa7bb4c5b082 100644 --- a/packages/variable-resolver/src/browser/common-variable-contribution.ts +++ b/packages/variable-resolver/src/browser/common-variable-contribution.ts @@ -135,7 +135,8 @@ export class CommonVariableContribution implements VariableContribution { }); } } - return this.quickInputService?.showQuickPick(elements, { placeholder: input.description }); + const selectedPick = await this.quickInputService?.showQuickPick(elements, { placeholder: input.description }); + return selectedPick?.value; } if (input.type === 'command') { if (typeof input.command !== 'string') {