golang / dep

Go dependency management tool experiment (deprecated)
https://golang.github.io/dep/
BSD 3-Clause "New" or "Revised" License
12.85k stars 1.05k forks source link

"unexpected error while defensively cleaning up" #2164

Closed cflewis closed 5 years ago

cflewis commented 5 years ago

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 commented 5 years ago

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

kevinburke commented 5 years ago

Ah, looks like https://github.com/golang/dep/pull/2168 fixes this.

cflewis commented 5 years ago

Sadly I can't help you on this one as the project I was working on that triggered this shut down :( I hope that PR fixes it.

Good luck!

On Sat, Jun 8, 2019 at 6:39 PM Kevin Burke notifications@github.com wrote:

Ah, looks like #2168 https://github.com/golang/dep/pull/2168 fixes this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/golang/dep/issues/2164?email_source=notifications&email_token=AAAKVPCDOLPUOFDLW5MYXKLPZRNNJA5CNFSM4HNQMQ52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXIBXBQ#issuecomment-500177798, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAKVPEH5LWZGVB5ABO6O4DPZRNNJANCNFSM4HNQMQ5Q .

homelchenko commented 5 years ago

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

danielzheng commented 5 years ago

same problem in mac.

geaaru commented 5 years ago

Hi, yeah it seems the same issue that I fixed in https://github.com/golang/dep/pull/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.