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

Commit

Permalink
gps: pass correct arguments to "git clean"
Browse files Browse the repository at this point in the history
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.

Fixes #2164.
Fixes #2168.
  • Loading branch information
Daniele Rondina authored and kevinburke committed Jun 13, 2019
1 parent 9fa5e4a commit f0d93a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gps/vcs_repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ func (r *gitRepo) defendAgainstSubmodules(ctx context.Context) error {
"submodule",
"foreach",
"--recursive",
"git",
"clean", "-x", "-d", "-f", "-f",
"git clean -x -d -f -f",
)
cmd.SetDir(r.LocalPath())
if out, err := cmd.CombinedOutput(); err != nil {
Expand Down

0 comments on commit f0d93a6

Please sign in to comment.