Closed netrounds-joakim closed 6 years ago
I now see why this happens when I look at the code.
godepsFile = filepath.Join("Godeps", "Godeps.json")
oldGodepsFile = filepath.Join("Godeps")
https://github.com/tools/godep/blob/master/godepfile.go#L14
The old format used a file with the same name as the directory. So one could check if it is a directory first, before trying to read it as a file.
I am closing this issue because the repo is going to be archived.
Expected behavior
If the
Godeps/
folder already exists, Godeps should just use it and createGodeps.json
inside.Or at least give a friendlier error message explaining why an empty directory is not allowed.
Actual behavior
If the directory
Godeps/
exists (and is empty), and I then rungodep save
I get the following error:Steps to reproduce behavior
godep version
outputgodep v74 (linux/amd64/go1.6.2)
go version
outputgo version go1.6.2 linux/amd64
Contents of Godeps.json file
There is no Godeps.json file when this bug appears.