-
Notifications
You must be signed in to change notification settings - Fork 54
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
provide a flag to override dotfile_for_shell #19
Comments
Hi @damianoneill, Since Because if not, I would instead install go at the system level without |
The way I'm using this is that I have a playbook for managing hosts, a subset, the hosts used by developers have a role that copies a playbook to the individual hosts that each individual developer runs. This playbook installs a set of version managers; nvm, pyenv, sdkman, etc and some other user home specific stuff. My expectation is as you said that g would be used in an interactive login shell, the problem is that when the developers run their playbook, ansible itself uses ssh in a non-login shell, see here https://stackoverflow.com/a/35989041 for an overview. Thanks Stefan. |
@damianoneill interesting use case. The thing is that I think I can add a flag to force the setup upon login profile files. But first I have to consider the implications. |
I might give it a look during the weekend. In the meantime, maybe you can patch the source ~/.bashrc
printf '\n%s %s %s %s' \
"export GOPATH=\"$(printf '%s' "$GOPATH" | sed "s|${HOME}|\$HOME|g")\";" \
"export GOROOT=\"$(printf '%s' "$GOROOT" | sed "s|${HOME}|\$HOME|g")\";" \
"export PATH=\"\$GOPATH/bin:\$PATH\";" \
"# g-install: do NOT edit, see https://github.com/stefanmaric/g" >> ~/.bash_profile Edited to fix typos in example script. |
Thanks Stefan, appreciate that. |
- Improve switching Go versions performance to nearly instant (#19, thanks @jimeh) - Add support for darwin-arm64 (M1 chips) (#20, thanks @joelanford) - Tweak docs, guidelines, and configs to make it easier to contribute - Format all documents with Prettier for consistency - Add Github template for BUG reports - Update screencast with more recent version of g
Won't be going forward with this request for the time being. If anyone is still interested, feel free to keep the thread going. |
Hi @stefanmaric thanks for this version manager.
Is it possible to provide a flag to the installer to specify the dotfile for shell.
I'm using the installer in an ansible role (https://galaxy.ansible.com/damianoneill/smg). Ansible uses a non-login shell over ssh, therefore for bash this will always select ~/.bashrc where ideally I want to update the dotfile for the login shell i.e. ~/.bash_profile.
Therefore if you could provide a way for me to overload the get_dotfile_for_shell response that would be fantastic.
Alternatively, if you have another suggestion that would be great.
Thanks,
Damian.
The text was updated successfully, but these errors were encountered: