returnthis.textFileService.saveAll().then((value)=>{// make sure all dirty files are saved
returnthis.configurationService.reloadConfiguration().then(()=>{// make sure configuration is up to date
returnthis.textFileService.saveAll().then((value)=>{// make sure all dirty files are saved
returnthis.configurationService.reloadConfiguration().then(()=>{// make sure configuration is up to date
returnthis.taskSystemPromise.
then((taskSystem)=>{
letexecuteResult=fn(taskSystem);
if(executeResult.kind===TaskExecuteKind.Active){
letactive=executeResult.active;
if(active.same&&active.watching){
if(active.same&&active.background){
this.messageService.show(Severity.Info,nls.localize('TaskSystem.activeSame','The task is already active and in watch mode. To terminate the task use `F1 > terminate task`'));
}else{
thrownewTaskError(Severity.Warning,nls.localize('TaskSystem.active','There is an active running task right now. Terminate it first before executing another task.'),TaskErrors.RunningTask);
thrownewTaskError(Severity.Error,nls.localize('TerminalTaskSystem.unknownError','A unknown error has occurred while executing a task. See task output log for details.'),TaskErrors.UnknownError);
thrownewTaskError(Severity.Info,nls.localize('TaskRunnerSystem.noBuildTask','No task is marked as a build task in the tasks.json. Mark a task with \'isBuildCommand\'.'),TaskErrors.NoBuildTask);