@@ -2948,7 +2948,7 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
2948
2948
*/
2949
2949
private _getDefaultTasks ( tasks : Task [ ] , taskGlobsInList : boolean = false ) : Task [ ] {
2950
2950
const defaults : Task [ ] = [ ] ;
2951
- for ( const task of tasks ) {
2951
+ for ( const task of tasks . filter ( t => ! ! t . configurationProperties . group ) ) {
2952
2952
// At this point (assuming taskGlobsInList is true) there are tasks with matching globs, so only put those in defaults
2953
2953
if ( taskGlobsInList && typeof ( task . configurationProperties . group as TaskGroup ) . isDefault === 'string' ) {
2954
2954
defaults . push ( task ) ;
@@ -3050,16 +3050,21 @@ export abstract class AbstractTaskService extends Disposable implements ITaskSer
3050
3050
3051
3051
// If no globs are found or matched fallback to checking for default tasks of the task group
3052
3052
if ( ! groupTasks . length ) {
3053
- groupTasks = await this . _findWorkspaceTasksInGroup ( taskGroup , false ) ;
3053
+ groupTasks = await this . _findWorkspaceTasksInGroup ( taskGroup , true ) ;
3054
3054
}
3055
3055
3056
- // A single default task was returned, just run it directly
3057
- if ( groupTasks . length === 1 ) {
3058
- return resolveTaskAndRun ( groupTasks [ 0 ] ) ;
3056
+ switch ( groupTasks . length ) {
3057
+ case 0 :
3058
+ // No tasks found, prompt to configure
3059
+ configure . apply ( this ) ;
3060
+ break ;
3061
+ case 1 :
3062
+ // A single default task was returned, just run it directly
3063
+ return resolveTaskAndRun ( groupTasks [ 0 ] ) ;
3064
+ default :
3065
+ // Multiple default tasks returned, show the quickPicker
3066
+ return handleMultipleTasks ( false ) ;
3059
3067
}
3060
-
3061
- // Multiple default tasks returned, show the quickPicker
3062
- return handleMultipleTasks ( false ) ;
3063
3068
} ) ( ) ;
3064
3069
this . _progressService . withProgress ( options , ( ) => promise ) ;
3065
3070
}
0 commit comments