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

"unexpected error while defensively cleaning up" #2164

Closed
cflewis opened this issue May 16, 2019 · 6 comments · Fixed by #2176
Closed

"unexpected error while defensively cleaning up" #2164

cflewis opened this issue May 16, 2019 · 6 comments · Fixed by #2176

Comments

@cflewis
Copy link
Member

cflewis commented May 16, 2019

Trying to import github.com/nightlyone/lockfile, which is an indirect dependency I have.

What version of dep are you using (dep version)?

v0.5.3

Also git version = git version 2.21.0.

What dep command did you run?

dep ensure -v

What did you expect to see?

Solved output.

What did you see instead?

Solving failure: No versions of github.com/nightlyone/lockfile met constraints:
	6a197d5ea61168f2ac821de2b7f011b250904900: unexpected error while defensively cleaning up after possible derelict nested submodule directories: Entering 'git-hooks'
error: unknown switch `x'
usage: git submodule--helper foreach [--quiet] [--recursive] [--] <command>

    -q, --quiet           Suppress output of entering each submodule command
    --recursive           Recurse into nested submodules

fatal: run_command returned non-zero status while recursing in the nested submodules of git-hooks
.
: command failed: [git submodule foreach --recursive git clean -x -d -f -f]: exit status 128
@kevinburke
Copy link
Collaborator

Huh. Can you run git help clean and tell me whether "-x" appears in the help text?

@kevinburke
Copy link
Collaborator

Ah, looks like #2168 fixes this.

@cflewis
Copy link
Member Author

cflewis commented Jun 9, 2019 via email

@homelchenko
Copy link

I ran into similar problem :\ (mac, git 2.22, dep 0.5.3)

@danielzheng
Copy link

same problem in mac.

@geaaru
Copy link

geaaru commented Jun 13, 2019

Hi, yeah it seems the same issue that I fixed in #2168

I have the same git version. I inserted an example about how we could reproduce it directly with git command.

I hope for the merge.

kevinburke pushed a commit that referenced this issue Jun 13, 2019
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.
kevinburke added a commit that referenced this issue Jun 13, 2019
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.
kevinburke added a commit that referenced this issue Jun 13, 2019
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.
kevinburke added a commit that referenced this issue Jun 13, 2019
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants