Skip to content

Commit

Permalink
fix: do not run shell command when shell isn't available
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Oct 5, 2020
1 parent d320732 commit 71d84e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions segment_command.go
Expand Up @@ -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, "||")
Expand Down

0 comments on commit 71d84e6

Please sign in to comment.