зеркало из https://github.com/golang/dep.git
Added check for multiple overrides in manifes files.
This commit is contained in:
Родитель
24c37f5f33
Коммит
319d04e4f3
|
@ -193,6 +193,9 @@ func fromRawManifest(raw rawManifest) (*Manifest, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if _, exists := m.Ovr[name]; exists {
|
||||
return nil, errors.Errorf("multiple overrides specified for %s, can only specify one", name)
|
||||
}
|
||||
m.Ovr[name] = prj
|
||||
}
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@ func TestReadManifestErrors(t *testing.T) {
|
|||
}{
|
||||
{"multiple constraints", "manifest/error1.toml"},
|
||||
{"multiple dependencies", "manifest/error2.toml"},
|
||||
{"multiple overrides", "manifest/error3.toml"},
|
||||
}
|
||||
|
||||
for _, tst := range tests {
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
ignored = ["github.com/foo/bar"]
|
||||
|
||||
[[override]]
|
||||
name = "github.com/golang/dep"
|
||||
branch = "master"
|
||||
|
||||
[[override]]
|
||||
name = "github.com/golang/dep"
|
||||
branch = "master"
|
Загрузка…
Ссылка в новой задаче