chruby icon indicating copy to clipboard operation
chruby copied to clipboard

zsh/test_chruby_exec fails when run under pbuilder

Open x-yuri opened this issue 9 years ago • 4 comments

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.

x-yuri avatar Jun 05 '15 13:06 x-yuri

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.

x-yuri avatar Jun 05 '15 14:06 x-yuri

Should we add a .zlogin file which should be loaded in login mode?

postmodern avatar Jun 20 '15 23:06 postmodern

I was thinking of adding .zprofile, and sourcing .zshrc there. But using .zlogin will supposedly work out as well.

x-yuri avatar Jun 22 '15 07:06 x-yuri

Related issue: https://github.com/postmodern/chruby/issues/502

Works fine on master, but not 0.39.0.

amomchilov avatar Mar 03 '24 17:03 amomchilov