Skip to content

Commit

Permalink
Remove code that duplicates Array.join from runAutomaticTasks.ts
Browse files Browse the repository at this point in the history
Fixes #64602
  • Loading branch information
alexr00 committed Dec 10, 2018
1 parent 5670416 commit b97740c
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,8 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
}

private showPrompt(taskNames: Array<string>): Promise<boolean> {
// We will only show the prompt if their are automatic tasks, so taskNames is at least of length 1.
let taskNamesPrint: string = '(' + taskNames[0];
for (let i = 1; i < taskNames.length; i++) {
taskNamesPrint += ', ' + taskNames[i];
}
taskNamesPrint += ')';
return new Promise<boolean>(resolve => {
this.notificationService.prompt(Severity.Info, nls.localize('tasks.run.allowAutomatic', "This folder has tasks {0} defined in \'tasks.json\' that run automatically when you open this folder. Do you allow automatic tasks to run when you open this folder?", taskNamesPrint),
this.notificationService.prompt(Severity.Info, nls.localize('tasks.run.allowAutomatic', "This folder has tasks ({0}) defined in \'tasks.json\' that run automatically when you open this folder. Do you allow automatic tasks to run when you open this folder?", taskNames.join(', ')),
[{
label: nls.localize('allow', "Allow"),
run: () => {
Expand Down

0 comments on commit b97740c

Please sign in to comment.