File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,7 @@ export class DatabaseUI extends DisposableObject {
390390 ) ;
391391 }
392392 await this . databaseManager . setCurrentDatabaseItem ( databaseItem ) ;
393+ await this . handleTourDependencies ( ) ;
393394 }
394395 } catch ( e ) {
395396 // rethrow and let this be handled by default error handling.
@@ -401,6 +402,22 @@ export class DatabaseUI extends DisposableObject {
401402 }
402403 } ;
403404
405+ private handleTourDependencies = async ( ) : Promise < void > => {
406+ if ( ! workspace . workspaceFolders ?. length ) {
407+ throw new Error ( "No workspace folder is open." ) ;
408+ } else {
409+ const tutorialQueriesPath = join (
410+ workspace . workspaceFolders [ 0 ] . uri . fsPath ,
411+ "tutorial-queries" ,
412+ ) ;
413+ const cli = this . queryServer ?. cliServer ;
414+ if ( ! cli ) {
415+ throw new Error ( "No CLI server found" ) ;
416+ }
417+ await cli . packInstall ( tutorialQueriesPath ) ;
418+ }
419+ } ;
420+
404421 handleRemoveOrphanedDatabases = async ( ) : Promise < void > => {
405422 void extLogger . log ( "Removing orphaned databases from workspace storage." ) ;
406423 let dbDirs = undefined ;
You can’t perform that action at this time.
0 commit comments