diff --git a/go.mod b/go.mod index 1b79a44b0..736e1a1f5 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/Masterminds/semver v1.5.0 - github.com/alexellis/go-execute/v2 v2.0.0 + github.com/alexellis/go-execute/v2 v2.1.0 github.com/cheggaaa/pb/v3 v3.1.4 github.com/docker/go-units v0.5.0 github.com/google/go-containerregistry v0.16.1 diff --git a/go.sum b/go.sum index 839d9d986..4950aa62c 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1o github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/alexellis/go-execute/v2 v2.0.0 h1:e2fB9kZcPG0yg65XHL1/t6efcCUdt32AMbr/mv7A2tc= github.com/alexellis/go-execute/v2 v2.0.0/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ= +github.com/alexellis/go-execute/v2 v2.1.0 h1:0HccwWLNzAonu9Mei2bL8dQThHoaS1c/vq2hQwQW0XY= +github.com/alexellis/go-execute/v2 v2.1.0/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ= github.com/cheggaaa/pb/v3 v3.1.4 h1:DN8j4TVVdKu3WxVwcRKu0sG00IIU6FewoABZzXbRQeo= github.com/cheggaaa/pb/v3 v3.1.4/go.mod h1:6wVjILNBaXMs8c21qRiaUM8BR82erfgau1DQ4iUXmSA= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= diff --git a/vendor/github.com/alexellis/go-execute/v2/exec.go b/vendor/github.com/alexellis/go-execute/v2/exec.go index 86e3d7b54..bc5ec4308 100644 --- a/vendor/github.com/alexellis/go-execute/v2/exec.go +++ b/vendor/github.com/alexellis/go-execute/v2/exec.go @@ -15,9 +15,7 @@ type ExecTask struct { // or the executable with arguments. The arguments are detected by looking for // a space. // - // Examples: - // - Just a binary executable: `/bin/ls` - // - Binary executable with arguments: `/bin/ls -la /` + // Any arguments must be given via Args Command string // Args are the arguments to pass to the command. These are ignored if the @@ -110,14 +108,18 @@ func (et ExecTask) Execute(ctx context.Context) (ExecResult, error) { commandArgs = append([]string{"-c"}, fmt.Sprintf("%s %s", et.Command, script)) } } else { - if strings.Contains(et.Command, " ") { - parts := strings.Split(et.Command, " ") - command = parts[0] - commandArgs = parts[1:] - } else { - command = et.Command - commandArgs = et.Args - } + + command = et.Command + commandArgs = et.Args + + // AE: This had to be removed to fix: #117 where Windows users + // have spaces in their paths, which are misinterpreted as + // arguments for the command. + // if strings.Contains(et.Command, " ") { + // parts := strings.Split(et.Command, " ") + // command = parts[0] + // commandArgs = parts[1:] + // } } cmd := exec.CommandContext(ctx, command, commandArgs...) diff --git a/vendor/modules.txt b/vendor/modules.txt index 90e1ce69e..3a626f321 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -4,7 +4,7 @@ github.com/Masterminds/semver # github.com/VividCortex/ewma v1.2.0 ## explicit; go 1.12 github.com/VividCortex/ewma -# github.com/alexellis/go-execute/v2 v2.0.0 +# github.com/alexellis/go-execute/v2 v2.1.0 ## explicit; go 1.20 github.com/alexellis/go-execute/v2 # github.com/cheggaaa/pb/v3 v3.1.4