chruby
chruby copied to clipboard
zsh/test_chruby_exec fails when run under pbuilder
See for yourself:
>>> Running ./test/chruby_exec_test.sh ...
test_chruby_exec_no_arguments
test_chruby_exec_no_command
test_chruby_exec
zsh:1: command not found: chruby
ASSERT:did change the ruby expected:<2.0.0> but was:<>
As it turns out it has something to do with [ -t 0 ] which is false under pbuilder. When run manually, the test passes.
I now see, running chruby works out because chruby.sh is included in .zshrc and .bashrc. But .zshrc is run only for interactive shells. The bash tests pass because .bashrc is included in .bash_profile.
Should we add a .zlogin file which should be loaded in login mode?
I was thinking of adding .zprofile, and sourcing .zshrc there. But using .zlogin will supposedly work out as well.
Related issue: https://github.com/postmodern/chruby/issues/502
Works fine on master, but not 0.39.0.