We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e178d6 commit 449e811Copy full SHA for 449e811
packages/components/src/storageUtils.ts
@@ -1036,15 +1036,12 @@ export const getGcsClient = () => {
1036
const projectId = process.env.GOOGLE_CLOUD_STORAGE_PROJ_ID
1037
const bucketName = process.env.GOOGLE_CLOUD_STORAGE_BUCKET_NAME
1038
1039
- if (!pathToGcsCredential) {
1040
- throw new Error('GOOGLE_CLOUD_STORAGE_CREDENTIAL env variable is required')
1041
- }
1042
if (!bucketName) {
1043
throw new Error('GOOGLE_CLOUD_STORAGE_BUCKET_NAME env variable is required')
1044
}
1045
1046
const storageConfig = {
1047
- keyFilename: pathToGcsCredential,
+ ...(pathToGcsCredential ? { keyFilename: pathToGcsCredential } : {}),
1048
...(projectId ? { projectId } : {})
1049
1050
0 commit comments