4 ms·
Just don't export it? OPENAI_API_KEY="your-api-key-here" codex
by jjmarr 2y ago
Just don't export it?
OPENAI_API_KEY="your-api-key-here" codex
- aesbetic 2y agoYea that’s not gonna work, you have to export it for it to become part of your shell’s environment and be passed down to subprocesses. You could however wrap the export variable and codex command in a script and just call that. This way the variable would only be part of that script’s environment.
- PhilipRoman 2y agoThat code example uses the "VAR=VALUE program" syntax, which exports the variable only for that particular process, so it should work (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...)
- aesbetic 2y agoYea you’re right. I viewed the comment on mobile where “codex” was wrapped to a new line. Now I know I should be careful examining code not formatted in a code block.