File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,16 @@ export async function registerCore(
5555 return ;
5656 }
5757 const workspaceFolder = vscode . workspace . workspaceFolders [ 0 ] ;
58+ const initCommand = currentProjectId . value ?
59+ `${ settings . firebasePath } init dataconnect --project ${ currentProjectId . value } ` :
60+ `${ settings . firebasePath } init dataconnect` ;
5861 vscode . tasks . executeTask (
5962 new vscode . Task (
6063 { type : "shell" } , // this is the same type as in tasks.json
6164 workspaceFolder , // The workspace folder
6265 "firebase init dataconnect" , // how you name the task
6366 "firebase init dataconnect" , // Shows up as MyTask: name
64- new vscode . ShellExecution ( ` ${ settings . firebasePath } init dataconnect --project ${ currentProjectId . value } ` ) ,
67+ new vscode . ShellExecution ( initCommand ) ,
6568 ) ,
6669 ) ;
6770 } ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ export function runCommand(command: string) {
2727 // TODO: This fails if the interactive shell is not expecting a command, such
2828 // as when oh-my-zsh asking for (Y/n) to updates during startup.
2929 // Consider using an non-interactive shell.
30- terminal . sendText ( `${ command } -P ${ currentProjectId . value } ` ) ;
30+ if ( currentProjectId . value ) {
31+ command = `${ command } --project ${ currentProjectId . value } ` ;
32+ }
33+ terminal . sendText ( command ) ;
3134}
3235
3336export function runTerminalTask (
You can’t perform that action at this time.
0 commit comments