зеркало из https://github.com/golang/dep.git
check: Include vendor/ in path output
This commit is contained in:
Родитель
26fced1909
Коммит
2c0659e7db
|
@ -132,27 +132,28 @@ func (cmd *checkCommand) Run(ctx *dep.Ctx, args []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
for pr, status := range statuses {
|
for pr, status := range statuses {
|
||||||
|
vpr := filepath.Join("vendor", string(pr))
|
||||||
switch status {
|
switch status {
|
||||||
case verify.NotInTree:
|
case verify.NotInTree:
|
||||||
logger.Printf("%s: missing from vendor\n", pr)
|
logger.Printf("%s: missing from vendor\n", vpr)
|
||||||
case verify.NotInLock:
|
case verify.NotInLock:
|
||||||
fi, err := os.Stat(filepath.Join(p.AbsRoot, "vendor", pr))
|
fi, err := os.Stat(filepath.Join(p.AbsRoot, vpr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "could not stat file that VerifyVendor claimed existed")
|
return errors.Wrap(err, "could not stat file that VerifyVendor claimed existed")
|
||||||
}
|
}
|
||||||
|
|
||||||
if fi.IsDir() {
|
if fi.IsDir() {
|
||||||
logger.Printf("%s: unused project\n", pr)
|
logger.Printf("%s: unused project\n", vpr)
|
||||||
} else {
|
} else {
|
||||||
logger.Printf("%s: orphaned file\n", pr)
|
logger.Printf("%s: orphaned file\n", vpr)
|
||||||
}
|
}
|
||||||
case verify.DigestMismatchInLock:
|
case verify.DigestMismatchInLock:
|
||||||
logger.Printf("%s: hash of vendored tree didn't match digest in Gopkg.lock\n", pr)
|
logger.Printf("%s: hash of vendored tree didn't match digest in Gopkg.lock\n", vpr)
|
||||||
case verify.HashVersionMismatch:
|
case verify.HashVersionMismatch:
|
||||||
// This will double-print if the hash version is zero, but
|
// This will double-print if the hash version is zero, but
|
||||||
// that's a rare case that really only occurs before the first
|
// that's a rare case that really only occurs before the first
|
||||||
// run with a version of dep >=0.5.0, so it's fine.
|
// run with a version of dep >=0.5.0, so it's fine.
|
||||||
logger.Printf("%s: hash algorithm mismatch, want version %v\n", pr, verify.HashVersion)
|
logger.Printf("%s: hash algorithm mismatch, want version %v\n", vpr, verify.HashVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче