fix(init): escape path characters

resolves #1789
This commit is contained in:
Jan De Dobbeleer 2022-02-20 16:11:27 +01:00 committed by Jan De Dobbeleer
parent 39dfca93c6
commit 78038aa5aa

View file

@ -48,7 +48,10 @@ func getExecutablePath(shell string) (string, error) {
executable = strings.ReplaceAll(executable, "\\", "/")
switch shell {
case bash, zsh:
return strings.ReplaceAll(executable, " ", "\\ "), nil
executable = strings.ReplaceAll(executable, " ", "\\ ")
executable = strings.ReplaceAll(executable, "(", "\\(")
executable = strings.ReplaceAll(executable, ")", "\\)")
return executable, nil
}
return executable, nil
}