1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

Fix execext.Expand for file names with spaces

Fixes #176
This commit is contained in:
Andrey Nering
2019-02-21 20:52:27 -03:00
parent 21e66c7c02
commit f8a6c5d06c
3 changed files with 19 additions and 5 deletions

View File

@@ -72,6 +72,7 @@ func IsExitError(err error) bool {
// Expand is a helper to mvdan.cc/shell.Fields that returns the first field
// if available.
func Expand(s string) (string, error) {
s = strings.Replace(s, " ", `\ `, -1)
fields, err := shell.Fields(s, nil)
if err != nil {
return "", err