fix: do not run shell command when shell isn't available

This commit is contained in:
Jan De Dobbeleer 2020-10-04 11:32:26 +02:00 committed by Jan De Dobbeleer
parent d3207328e5
commit 71d84e64df

View file

@ -17,6 +17,9 @@ const (
func (c *command) enabled() bool {
shell := c.props.getString(ExecutableShell, "bash")
if !c.env.hasCommand(shell) {
return false
}
command := c.props.getString(Command, "echo no command specified")
if strings.Contains(command, "||") {
commands := strings.Split(command, "||")