Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1109 from ibrasho-forks/fix-out-of-sync-error
Browse files Browse the repository at this point in the history
Update out-of-sync error message in ensure
  • Loading branch information
carolynvs authored Sep 3, 2017
2 parents 3b01418 + 8a8d73c commit 238d8af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/dep/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (cmd *ensureCommand) runUpdate(ctx *dep.Ctx, args []string, p *dep.Project,
// "pending" changes, or the -update that caused the problem?).
// TODO(sdboyer) reduce this to a warning?
if !bytes.Equal(p.Lock.InputHash(), solver.HashInputs()) {
return errors.Errorf("%s and %s are out of sync. Run a plain dep ensure to resync them before attempting to -update", dep.ManifestName, dep.LockName)
return errors.Errorf("%s is out of sync with %s or the project's imports. Run \"dep ensure\" to resync them first before running \"dep ensure -update\"", dep.LockName, dep.ManifestName)
}

// When -update is specified without args, allow every dependency to change
Expand Down Expand Up @@ -428,7 +428,7 @@ func (cmd *ensureCommand) runAdd(ctx *dep.Ctx, args []string, p *dep.Project, sm
// "pending" changes, or the -add that caused the problem?).
// TODO(sdboyer) reduce this to a warning?
if p.Lock != nil && !bytes.Equal(p.Lock.InputHash(), solver.HashInputs()) {
return errors.Errorf("%s and %s are out of sync. Run a plain dep ensure to resync them before attempting to -add", dep.ManifestName, dep.LockName)
return errors.Errorf("%s is out of sync with %s or the project's imports. Run \"dep ensure\" to resync them first before running \"dep ensure -add\"", dep.LockName, dep.ManifestName)
}

rm, _ := params.RootPackageTree.ToReachMap(true, true, false, p.Manifest.IgnoredPackages())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"commands": [
["ensure", "-add", "foobar.com/baz"]
],
"error-expected": "Gopkg.toml and Gopkg.lock are out of sync. Run a plain dep ensure to resync them before attempting to -add"
"error-expected": "Gopkg.lock is out of sync with Gopkg.toml or the project's imports. Run \"dep ensure\" to resync them first before running \"dep ensure -add\""
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"commands": [
["ensure", "-update"]
],
"error-expected": "Gopkg.toml and Gopkg.lock are out of sync. Run a plain dep ensure to resync them before attempting to -update"
"error-expected": "Gopkg.lock is out of sync with Gopkg.toml or the project's imports. Run \"dep ensure\" to resync them first before running \"dep ensure -update\""
}

0 comments on commit 238d8af

Please sign in to comment.