Skip to content

Commit 1f8fa5e

Browse files
authored
Merge pull request #713 from Pythagora-io/fix-dotenv
prefer cli args over environment flags (so ext can override)
2 parents fb2b698 + a64c8f4 commit 1f8fa5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pilot/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def init():
5454
builtins.print, ipc_client_instance = get_custom_print(args)
5555

5656
if '--api-key' in args:
57-
os.environ["OPENAI_API_KEY"] = os.getenv('OPENAI_API_KEY') or args['--api-key']
57+
os.environ["OPENAI_API_KEY"] = args['--api-key']
5858
if '--api-endpoint' in args:
59-
os.environ["OPENAI_ENDPOINT"] = os.getenv('OPENAI_ENDPOINT') or args['--api-endpoint']
59+
os.environ["OPENAI_ENDPOINT"] = args['--api-endpoint']
6060

6161
if '--get-created-apps-with-steps' in args:
6262
run_exit_fn = False

0 commit comments

Comments
 (0)