mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
fix: fix bug for files with special chars &() (#1584)
This commit is contained in:
@@ -103,6 +103,9 @@ func IsExitError(err error) bool {
|
||||
func Expand(s string) (string, error) {
|
||||
s = filepath.ToSlash(s)
|
||||
s = strings.ReplaceAll(s, " ", `\ `)
|
||||
s = strings.ReplaceAll(s, "&", `\&`)
|
||||
s = strings.ReplaceAll(s, "(", `\(`)
|
||||
s = strings.ReplaceAll(s, ")", `\)`)
|
||||
fields, err := shell.Fields(s, nil)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user