Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 753b47d

Browse files
committed
gps: pass correct arguments to "git clean"
Previously, the "-x" in git submodule foreach --recursive git clean -x was being applied to the "git submodule" command not the "git clean" command. git submodule foreach expects the inner command to be wrapped in a single string, so pass git clean as a single string. Verified this works as expected on the command line. Originally submitted as #2164 by Daniele Rodina <[email protected]>, re-submitted by me to amend the commit and merge immediately. Fixes #2164. Fixes #2168.
1 parent 1a585d2 commit 753b47d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gps/vcs_repo.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ func (r *gitRepo) defendAgainstSubmodules(ctx context.Context) error {
146146
"submodule",
147147
"foreach",
148148
"--recursive",
149-
"git",
150-
"clean", "-x", "-d", "-f", "-f",
149+
"git clean -x -d -f -f",
151150
)
152151
cmd.SetDir(r.LocalPath())
153152
if out, err := cmd.CombinedOutput(); err != nil {

0 commit comments

Comments
 (0)