From ef47d55b436daea1a5e197af59694fbaab764d19 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Tue, 10 Oct 2023 11:34:59 -0400 Subject: [PATCH] update(gpt-engineer) --- .../AntonOsika/gpt-engineer/entrypoint.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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 <