execvp failed: No such file or directory
piotr-yuxuan opened this issue · comments
Hello,
Thanks for you work :-) However, envchain sometimes fails unexcpetedly. For instance:
$ envchain ns eval "echo 1"
#=> execvp failed: No such file or directory
It fails for any namespace.
Because it doesn't use a shell. Your command line finds eval
command from your $PATH
.
You should do envchain ns sh -c 'echo 1'
(or maybe bash -c
) to run a shell instead.
Thanks, great! Actually I was much more trying to load an namespace at terminal bootstrap than echoing a number ^^
Your message lead me to find login -pfq Alice zsh -c "envchain ns zsh"
can achieve so. Methinks .profile
and .zshrc
are read only once but I'd gladly welcome any further idea :-)
I have not tried to do so, and It doesn't resolve a issue that envchain targets, I do no recommend. envchain is to allow selecting secret environment variables for each commands to human.
I also have this error, when I try in a shell (zsh) to run a command having just set a namespace:
$ envchain my-ns-with-dashes aws ec2 describe-amis
execvp failed: No such file or directory
I have envchain 1.0.1 on macOS 10.12.
This would be different problem, but I strongly believe it have wrong configuration on your shell environment. At least I use namespace including dashes and experiencing no problem.
The error shows envchain couldn't find aws
from your $PATH
environment variable.
Thanks; you were right. Totally user error, it wasn't installed.