diff --git a/packages/task/src/browser/task-schema-updater.ts b/packages/task/src/browser/task-schema-updater.ts index 98b413e9003cd..12c24c73c9e12 100644 --- a/packages/task/src/browser/task-schema-updater.ts +++ b/packages/task/src/browser/task-schema-updater.ts @@ -17,6 +17,7 @@ import { injectable, inject } from 'inversify'; import { JsonSchemaStore } from '@theia/core/lib/browser/json-schema-store'; import { InMemoryResources, deepClone } from '@theia/core/lib/common'; import { IJSONSchema } from '@theia/core/lib/common/json-schema'; +import { inputsSchema } from '@theia/variable-resolver/lib/browser/variable-input-schema'; import URI from '@theia/core/lib/common/uri'; import { TaskService } from './task-service'; @@ -42,7 +43,8 @@ export class TaskSchemaUpdater { items: { ...deepClone(taskConfigurationSchema) } - } + }, + inputs: inputsSchema.definitions!.inputs } }; const taskTypes = await this.taskService.getRegisteredTaskTypes(); diff --git a/packages/variable-resolver/src/browser/common-variable-contribution.ts b/packages/variable-resolver/src/browser/common-variable-contribution.ts index 7f7e53d3a44c5..4d09b988d44f7 100644 --- a/packages/variable-resolver/src/browser/common-variable-contribution.ts +++ b/packages/variable-resolver/src/browser/common-variable-contribution.ts @@ -85,7 +85,7 @@ export class CommonVariableContribution implements VariableContribution { const inputs = !!configuration && 'inputs' in configuration ? configuration.inputs : undefined; const input = Array.isArray(inputs) && inputs.find(item => !!item && item.id === variable); if (!input) { - throw new Error(`Undefined input variable "${variable}" encountered. Remove or define "${variable}" to continue.`); + return undefined; } if (input.type === 'promptString') { if (typeof input.description !== 'string') { diff --git a/packages/variable-resolver/src/browser/variable-resolver-service.ts b/packages/variable-resolver/src/browser/variable-resolver-service.ts index 5de929218cbfd..0b0fb157bc112 100644 --- a/packages/variable-resolver/src/browser/variable-resolver-service.ts +++ b/packages/variable-resolver/src/browser/variable-resolver-service.ts @@ -150,7 +150,6 @@ export namespace VariableResolverService { } catch (e) { console.error(`Failed to resolved '${name}' variable`, e); this.resolved.set(name, undefined); - throw e; } }