File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 121
121
"type" : " number" ,
122
122
"description" : " By default how much lineage should expand." ,
123
123
"default" : 1
124
+ },
125
+ "dbt.installDepsOnProjectInitialization" : {
126
+ "type" : " boolean" ,
127
+ "description" : " Install dbt deps on project initialization" ,
128
+ "default" : true
124
129
}
125
130
}
126
131
},
Original file line number Diff line number Diff line change @@ -523,9 +523,12 @@ export class DBTProject implements Disposable {
523
523
project : this ,
524
524
inProgress : true ,
525
525
} ) ;
526
- if ( ! this . depsInitialized ) {
526
+ const installDepsOnProjectInitialization = workspace
527
+ . getConfiguration ( "dbt" )
528
+ . get < boolean > ( "installDepsOnProjectInitialization" , true ) ;
529
+ if ( ! this . depsInitialized && installDepsOnProjectInitialization ) {
527
530
try {
528
- await this . installDeps ( ) ;
531
+ await this . installDeps ( true ) ;
529
532
} catch ( error : any ) {
530
533
// this is best effort
531
534
console . warn ( "An error occured while installing dependencies" , error ) ;
@@ -655,10 +658,13 @@ export class DBTProject implements Disposable {
655
658
) ;
656
659
}
657
660
658
- async installDeps ( ) {
661
+ async installDeps ( silent = false ) {
659
662
this . telemetry . sendTelemetryEvent ( "installDeps" ) ;
660
663
const installDepsCommand =
661
664
this . dbtCommandFactory . createInstallDepsCommand ( ) ;
665
+ if ( silent ) {
666
+ installDepsCommand . focus = false ;
667
+ }
662
668
return this . dbtProjectIntegration . deps ( installDepsCommand ) ;
663
669
}
664
670
You can’t perform that action at this time.
0 commit comments