diff --git a/projects/github.com/AntonOsika/gpt-engineer/entrypoint.sh b/projects/github.com/AntonOsika/gpt-engineer/entrypoint.sh index b4b03b2d..3a71d8df 100644 --- a/projects/github.com/AntonOsika/gpt-engineer/entrypoint.sh +++ b/projects/github.com/AntonOsika/gpt-engineer/entrypoint.sh @@ -1,18 +1,15 @@ -#!/usr/bin/env -S tea bash - -#--- -# dependencies: -# charm.sh/gum: '*' -#--- +#!/usr/bin/env -S pkgx +gum bash +# shellcheck shell=bash 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 <