mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 17:52:34 -05:00
Merge from vscode 2cd495805cf99b31b6926f08ff4348124b2cf73d
This commit is contained in:
committed by
AzureDataStudio
parent
a8a7559229
commit
1388493cc1
@@ -1064,9 +1064,9 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
const eol = model.getEOL();
|
||||
const edits = format(JSON.stringify(task), undefined, { eol, tabSize, insertSpaces });
|
||||
let stringified = applyEdits(JSON.stringify(task), edits);
|
||||
const regex = new RegExp(eol + '\\t', 'g');
|
||||
stringified = stringified.replace(regex, eol + '\t\t\t');
|
||||
const twoTabs = '\t\t';
|
||||
const regex = new RegExp(eol + (insertSpaces ? strings.repeat(' ', tabSize) : '\\t'), 'g');
|
||||
stringified = stringified.replace(regex, eol + (insertSpaces ? strings.repeat(' ', tabSize * 3) : '\t\t\t'));
|
||||
const twoTabs = insertSpaces ? strings.repeat(' ', tabSize * 2) : '\t\t';
|
||||
stringValue = twoTabs + stringified.slice(0, stringified.length - 1) + twoTabs + stringified.slice(stringified.length - 1);
|
||||
} finally {
|
||||
if (reference) {
|
||||
@@ -1089,7 +1089,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
const contentValue = content.toString();
|
||||
let stringValue: string | undefined;
|
||||
if (configIndex !== -1) {
|
||||
const json: TaskConfig.ExternalTaskRunnerConfiguration = JSON.parse(contentValue);
|
||||
const json: TaskConfig.ExternalTaskRunnerConfiguration = this.configurationService.getValue<TaskConfig.ExternalTaskRunnerConfiguration>('tasks', { resource });
|
||||
if (json.tasks && (json.tasks.length > configIndex)) {
|
||||
stringValue = await this.formatTaskForJson(resource, json.tasks[configIndex]);
|
||||
}
|
||||
@@ -1874,7 +1874,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
|
||||
}
|
||||
}
|
||||
if (isAffected) {
|
||||
this._outputChannel.append(nls.localize('TaskSystem.invalidTaskJsonOther', 'Error: The content of the tasks json in {0} has syntax errors. Please correct them before executing a task.\n', location));
|
||||
this._outputChannel.append(nls.localize({ key: 'TaskSystem.invalidTaskJsonOther', comment: ['Message notifies of an error in one of several places there is tasks related json, not necessarily in a file named tasks.json'] }, 'Error: The content of the tasks json in {0} has syntax errors. Please correct them before executing a task.\n', location));
|
||||
this.showOutput();
|
||||
return { config, hasParseErrors: true };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user