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

Check NVM Version fails if fallback shell is used #33

Open
mirekdlugosz opened this issue May 26, 2022 · 1 comment
Open

Check NVM Version fails if fallback shell is used #33

mirekdlugosz opened this issue May 26, 2022 · 1 comment
Assignees

Comments

@mirekdlugosz
Copy link

When nvm_profile is set to path that doesn't contain bash/zsh/csh/tcsh, role will fall back to setting user_shell.command to /etc/bash -ic and fail the first time it is used:

TASK [morgangraphics.ansible_role_nvm : Check NVM Version] *********************
fatal: [default]: FAILED! => {"changed": true, "cmd": "/etc/bash -ic \"nvm --version\"", "delta": "0:00:00.002488", "end": "2022-05-26 12:32:01.105866", "msg": "non-zero return code", "rc": 127, "start": "2022-05-26 12:32:01.103378", "stderr": "/bin/sh: 1: /etc/bash: not found", "stderr_lines": ["/bin/sh: 1: /etc/bash: not found"], "stdout": "", "stdout_lines": []}

I am pretty confident it should have been /bin/bash -ic.

I don't know if any distro ever shipped /etc/bash (most popular, like Ubuntu or Fedora, don't). And even if it did, it was probably some kind of configuration file, not executable.

@morgangraphics
Copy link
Owner

Good catch - I'll use the default environment variable SHELL as a default instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants