mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-26 02:21:25 -08:00
fix: do not run shell command when shell isn't available
This commit is contained in:
parent
d3207328e5
commit
71d84e64df
|
@ -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, "||")
|
||||
|
|
Loading…
Reference in a new issue