0xacx / chatGPT-shell-cli

Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.
https://gptshell.cc
MIT License
1.15k stars 159 forks source link

syntax error in install.sh #117

Open hvl71 opened 1 year ago

hvl71 commented 1 year ago

I install on Ubuntu 22.04 using the install script:

curl -sS https://raw.githubusercontent.com/0xacx/chatGPT-shell-cli/main/install.sh | sudo -E bash
Installed chatgpt script to /usr/local/bin/chatgpt The script will add the OPENAI_KEY environment variable to your shell profile and add /usr/local/bin to your PATH Would you like to continue? (Yes/No) OpenAI key and chatgpt path added to ~/.zshrc Installation complete bash: line 93: syntax error near unexpected token else' bash: line 93:else'

The syntax error is a bit confusing and maybe influences functionality?

0xacx commented 1 year ago

@hvl71 Thank you very much for reporting! I always test this script by running it locally where it works fine but getting it with curl first does produce this syntax error, which is weird! It does not influence functionality since it seems that the installation continues normally, but it definitely shouldn't appear as there is no syntax error in the script normally.

felisucoibi commented 1 year ago

Same problem here, not working with ubunu 23.04, same error and the openai key is not asked

Installed chatgpt script to /usr/local/bin/chatgpt The script will add the OPENAI_KEY environment variable to your shell profile and add /usr/local/bin to your PATH Would you like to continue? (Yes/No) OpenAI key and chatgpt path added to ~/.profile Installation complete bash: línea 93: error sintáctico cerca del elemento inesperado else' bash: línea 93:else'