Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit eb698a3

Browse files
committed
remove prompt to create API key, send user straight to docs
1 parent 2f541ec commit eb698a3

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

data_diff/dbt.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -292,16 +292,7 @@ def _initialize_api() -> Optional[DatafoldAPI]:
292292
rich.print("[red]API key not found. Getting from the keyring service")
293293
api_key = keyring.get_password("data-diff", "DATAFOLD_API_KEY")
294294
if not api_key:
295-
rich.print("[red]API key not found, add it as an environment variable called DATAFOLD_API_KEY.")
296-
297-
yes_or_no = Confirm.ask("Would you like to generate a new API key?")
298-
if yes_or_no:
299-
webbrowser.open(f"{datafold_host}/login?next={datafold_host}/users/me")
300-
rich.print('After generating, please, perform in the terminal "export DATAFOLD_API_KEY=<key>"')
301-
return None
302-
else:
303-
raise ValueError("Cannot initialize API because the API key is not provided")
304-
295+
rich.print("[red]API key not found. Please follow the steps at https://docs.datafold.com/development_testing/cloud to use the --cloud flag.")
305296
rich.print("Saving the API key to the system keyring service")
306297
try:
307298
keyring.set_password("data-diff", "DATAFOLD_API_KEY", api_key)

0 commit comments

Comments
 (0)