File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
packages/flutterfire_cli/lib/src Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ Future<Map<String, dynamic>> runFirebaseCommand(
8787 String ? serviceAccount,
8888 }) async {
8989 final workingDirectoryPath = Directory .current.path;
90- final execArgs = [
90+ var command = 'firebase' ;
91+ var execArgs = [
9192 ...commandAndArgs,
9293 '--json' ,
9394 if (project != null ) '--project=$project ' ,
@@ -105,26 +106,17 @@ Future<Map<String, dynamic>> runFirebaseCommand(
105106 logMissingFirebaseCli,
106107 );
107108 }
108- final npxExecArgs = [
109+ command = 'npx'
110+ execArgs = [
109111 'firebase-tools@latest'
110112 ...execArgs,
111113 ];
112- process = await Process .run (
113- 'npx' ,
114- npxExecArgs,
115- workingDirectory: workingDirectoryPath,
116- environment: {
117- if (serviceAccount != null )
118- 'GOOGLE_APPLICATION_CREDENTIALS' : serviceAccount,
119- },
120- runInShell: true ,
121- );
122114 }
123115
124116 ProcessResult process;
125117 try {
126118 process = await Process .run (
127- 'firebase' ,
119+ command ,
128120 execArgs,
129121 workingDirectory: workingDirectoryPath,
130122 environment: {
You can’t perform that action at this time.
0 commit comments