Skip to content

Commit 784b2e5

Browse files
Update scripts/agent-evals/src/runner/index.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent e1d183e commit 784b2e5

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

scripts/agent-evals/src/runner/index.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,18 @@ function createRunDirectory(testName: string): RunDirectories {
7878
}
7979

8080
function copyFirebaseCliConfigstore(fromDir: string, toDir: string) {
81-
const toDirResolved = path.resolve(toDir);
82-
mkdirSync(toDirResolved, { recursive: true });
83-
84-
copyFileSync(
85-
path.join(fromDir, FIREBASE_CONFIG_FILENAME),
86-
path.join(toDirResolved, FIREBASE_CONFIG_FILENAME),
87-
);
81+
mkdirSync(toDir, { recursive: true });
82+
try {
83+
copyFileSync(
84+
path.join(fromDir, FIREBASE_CONFIG_FILENAME),
85+
path.join(toDir, FIREBASE_CONFIG_FILENAME),
86+
);
87+
} catch (e: any) {
88+
if (e.code === "ENOENT") {
89+
const sourceFile = path.join(fromDir, FIREBASE_CONFIG_FILENAME);
90+
console.warn(`Firebase CLI config file not found at ${sourceFile}. Skipping copy. If you want to use your local Firebase login, please log in with the Firebase CLI.`);
91+
} else {
92+
throw e;
93+
}
94+
}
8895
}

0 commit comments

Comments
 (0)