mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-25 13:37:51 +00:00
improve error message
This commit is contained in:
+2
-2
@@ -138,7 +138,7 @@ func (l *PackageList) Add(p *Package) error {
|
||||
existing, ok := l.packages[key]
|
||||
if ok {
|
||||
if !existing.Equals(p) {
|
||||
return &PackageConflictError{fmt.Errorf("conflict in package %s", p)}
|
||||
return &PackageConflictError{fmt.Errorf("package already exists and is different: %s", p)}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -201,7 +201,7 @@ func (l *PackageList) Append(pl *PackageList) error {
|
||||
existing, ok := l.packages[k]
|
||||
if ok {
|
||||
if !existing.Equals(p) {
|
||||
return fmt.Errorf("conflict in package %s", p)
|
||||
return fmt.Errorf("package already exists and is different: %s", p)
|
||||
}
|
||||
} else {
|
||||
l.packages[k] = p
|
||||
|
||||
Reference in New Issue
Block a user