diff --git a/projects/github.com/AntonOsika/gpt-engineer/entrypoint.sh b/projects/github.com/AntonOsika/gpt-engineer/entrypoint.sh index b4b03b2d..bfec2b13 100644 --- a/projects/github.com/AntonOsika/gpt-engineer/entrypoint.sh +++ b/projects/github.com/AntonOsika/gpt-engineer/entrypoint.sh @@ -1,4 +1,5 @@ #!/usr/bin/env -S tea bash +# shellcheck shell=bash #--- # dependencies: @@ -8,11 +9,12 @@ set -eo pipefail # attempt to get the key from the user’s shell rc files (if set) -if [ -z "$OPENAI_API_KEY" -a -n "$SHELL" ]; then +if [ -z "$OPENAI_API_KEY" ] && [ -n "$SHELL" ]; then + # shellcheck disable=SC2155,2016 export OPENAI_API_KEY="$(env -i "$SHELL" -ic 'echo $OPENAI_API_KEY')" fi -if [ -z "$OPENAI_API_KEY"]; then +if [ -z "$OPENAI_API_KEY" ]; then gum format <