Files
azuredatastudio/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.ts

13 lines
786 B
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as nls from 'vs/nls';
import { IJSONSchema } from 'vs/base/common/jsonSchema';
export function applyDeprecatedVariableMessage(schema: IJSONSchema) {
schema.pattern = schema.pattern || '^(?!.*\\$\\{(env|config|command)\\.)';
schema.patternErrorMessage = schema.patternErrorMessage ||
nls.localize('deprecatedVariables', "'env.', 'config.' and 'command.' are deprecated, use 'env:', 'config:' and 'command:' instead.");
}