Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong shell profile in install script message #94

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

inteon
Copy link
Contributor

@inteon inteon commented Mar 6, 2023

fixes #93

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't work for me. I used nixery to create a container with zsh + curl + other tools, and it still printed out the bash install instructions....because there was no $SHELL environment variable.

How did you test this?

richard@LAPTOP-HJEQ9V9G:~$ docker run --rm -it nixery.dev/curl/gnutar/gzip/coreutils/zsh zsh -c 'curl -fsSL https://raw.githubusercontent.com/jetstack/jsctl/fix_typo_install_script/install.sh | zsh'
######################################################################## 100.0%
jsctl was installed successfully to //.jsctl/bin/jsctl

Manually add the directory to your $HOME/.bashrc (or similar)
  export JSCTL_INSTALL="//.jsctl"
  export PATH="$JSCTL_INSTALL/bin:$PATH"

And run "source //.bashrc" to update your current shell

Run '//.jsctl/bin/jsctl --help' to get started

Checkout https://platform.jetstack.io/documentation for more information

@wallrj
Copy link
Member

wallrj commented Mar 7, 2023

Found some more info here: https://stackoverflow.com/questions/3327013/how-to-determine-the-current-interactive-shell-that-im-in-command-line

richard@LAPTOP-HJEQ9V9G:~$ docker run --rm -it nixery.dev/curl/gnutar/gzip/coreutils/zsh zsh -c 'echo $SHELL'

richard@LAPTOP-HJEQ9V9G:~$ docker run --rm -it nixery.dev/curl/gnutar/gzip/coreutils/zsh zsh -c 'echo $shell'

richard@LAPTOP-HJEQ9V9G:~$ docker run --rm -it nixery.dev/curl/gnutar/gzip/coreutils/zsh zsh -c 'echo $ZSH_NAME'
zsh

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@inteon
Copy link
Contributor Author

inteon commented Mar 8, 2023

@wallrj This issue should be fixed now.

@inteon inteon requested a review from wallrj March 8, 2023 11:04
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
I retested and could see it working.

docker run --rm -it nixery.dev/curl/gnutar/gzip/coreutils/zsh zsh -c 'export HOME=/tmp; curl -fsSL https://raw.githubusercontent.com/jetstack/jsctl/fix_typo_install_script/install.sh | zsh; echo export JSCTL_INSTALL="/tmp/.jsctl" >> /tmp/.zshrc; echo export PATH="$JSCTL_INSTALL/bin:$PATH" >> /tmp/.zshrc; source /tmp/.zshrc; cat /tmp/.zshrc; jsctl '

/lgtm

@inteon inteon merged commit 9a42d52 into main Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post install.sh command output: shell reference
3 participants