File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -151,11 +151,19 @@ if ! command -v copilot >/dev/null 2>&1; then
151151 echo " "
152152 echo " Notice: $INSTALL_DIR is not in your PATH"
153153
154- # Detect shell rc file
154+ # Detect shell profile file for PATH
155155 case " $( basename " ${SHELL:-/ bin/ sh} " ) " in
156- zsh) RC_FILE=" $HOME /.zshrc" ;;
157- bash) RC_FILE=" $HOME /.bashrc" ;;
158- * ) RC_FILE=" $HOME /.profile" ;;
156+ zsh) RC_FILE=" ${ZDOTDIR:- $HOME } /.zprofile" ;;
157+ bash)
158+ if [ -f " $HOME /.bash_profile" ]; then
159+ RC_FILE=" $HOME /.bash_profile"
160+ elif [ -f " $HOME /.bash_login" ]; then
161+ RC_FILE=" $HOME /.bash_login"
162+ else
163+ RC_FILE=" $HOME /.profile"
164+ fi
165+ ;;
166+ * ) RC_FILE=" $HOME /.profile" ;;
159167 esac
160168
161169 # Prompt user to add to shell rc file (only if interactive)
You can’t perform that action at this time.
0 commit comments