diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e07a645..c95a6136 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,9 @@ Mode is enabled ([#166](https://github.com/go-task/task/issues/166)); - Fix file timestamp issue when the file name has spaces - ([#176](https://github.com/go-task/task/issues/176)). + ([#176](https://github.com/go-task/task/issues/176)); +- Mitigating path expanding issues on Windows + ([#170](https://github.com/go-task/task/pull/170)). ## v2.3.0 - 2019-01-02 diff --git a/internal/execext/exec.go b/internal/execext/exec.go index 4d29cce8..e7bbe5d7 100644 --- a/internal/execext/exec.go +++ b/internal/execext/exec.go @@ -5,6 +5,7 @@ import ( "errors" "io" "os" + "path/filepath" "strings" "mvdan.cc/sh/expand" @@ -72,6 +73,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 = filepath.ToSlash(s) s = strings.Replace(s, " ", `\ `, -1) fields, err := shell.Fields(s, nil) if err != nil {