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

Run a Shell Script broken if the default shell is zsh #493

Open
noaho opened this issue Sep 2, 2017 · 3 comments
Open

Run a Shell Script broken if the default shell is zsh #493

noaho opened this issue Sep 2, 2017 · 3 comments

Comments

@noaho
Copy link

noaho commented Sep 2, 2017

Hi,

I can't run shell scripts with controlplane, I just get (script terminated with a non-zero status '127') even if I use the picker to select the file, and it has correct permissions (755).

Another user reported the same problem while having zsh as his default shell, so I believe this to be related to the problem.

#443 (comment)

@gamell
Copy link

gamell commented Sep 15, 2017

Same here with fish shell

@microbug
Copy link

microbug commented Nov 4, 2017

You may be able to work around this by specifying the full path of any executables in your script. You can get the path of an application by doing command -v name, e.g., command -v python3 returns /usr/local/bin/python3.

@fharper
Copy link

fharper commented Dec 17, 2020

ControlPlane is executing the shellscript in bash, I guess the idea would be to add the opportunity to choose which shell you want to use to execute the scripts.

In the meantime, you can call your command like this
/bin/zsh -i -c "the command that works in your shell"

-i make the shell interactive, and will read your $HOME/.zshrc file
-c run the command after
You don't need the double quote if your command doesn't have any arguments

That will be bullet proof since it's also working in zsh also. The only thing is that you are loading the shell each time.

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

No branches or pull requests

4 participants