Skip to content

Commit b97740c

Browse files
committed
Remove code that duplicates Array.join from runAutomaticTasks.ts
Fixes microsoft#64602
1 parent 5670416 commit b97740c

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/vs/workbench/parts/tasks/electron-browser/runAutomaticTasks.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,8 @@ export class RunAutomaticTasks extends Disposable implements IWorkbenchContribut
8989
}
9090

9191
private showPrompt(taskNames: Array<string>): Promise<boolean> {
92-
// We will only show the prompt if their are automatic tasks, so taskNames is at least of length 1.
93-
let taskNamesPrint: string = '(' + taskNames[0];
94-
for (let i = 1; i < taskNames.length; i++) {
95-
taskNamesPrint += ', ' + taskNames[i];
96-
}
97-
taskNamesPrint += ')';
9892
return new Promise<boolean>(resolve => {
99-
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),
93+
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(', ')),
10094
[{
10195
label: nls.localize('allow', "Allow"),
10296
run: () => {

0 commit comments

Comments
 (0)