Skip to content

Commit 70e88b3

Browse files
better error when GCP not set
1 parent 1471602 commit 70e88b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/genesys/generate.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ def main(config: GenerateConfig):
5151

5252
# Initialize components
5353
log("[cyan] Configuring output path and gcp bucket...[/]")
54+
if config.gcp_bucket is not None:
55+
gcp_credentials = os.environ.get("GCP_CREDENTIALS_BASE64")
56+
assert gcp_credentials is not None, "the GCP_CREDENTIALS_BASE64 environment variable is not set"
5457
if not os.path.exists(config.path_output):
5558
os.makedirs(config.path_output)
5659
gcp_bucket = (
57-
GcpBucket(config.gcp_bucket, os.environ.get("GCP_CREDENTIALS_BASE64"))
60+
GcpBucket(config.gcp_bucket, gcp_credentials)
5861
if config.gcp_bucket is not None
5962
else None
6063
)

0 commit comments

Comments
 (0)