Skip to content

Commit

Permalink
Adds stack to error message in postal
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Moran authored and ForestEckhardt committed Nov 3, 2021
1 parent 05da1f0 commit 93ac16d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion postal/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ func (s Service) Resolve(path, id, version, stack string) (Dependency, error) {

if len(compatibleVersions) == 0 {
return Dependency{}, fmt.Errorf(
"failed to satisfy %q dependency version constraint %q: no compatible versions. Supported versions are: [%s]",
"failed to satisfy %q dependency version constraint %q: no compatible versions on %q stack. Supported versions are: [%s]",
id,
version,
stack,
strings.Join(supportedVersions, ", "),
)
}
Expand Down
2 changes: 1 addition & 1 deletion postal/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ version = "this is super not semver"
context("when the entry version constraint cannot be satisfied", func() {
it("returns an error with all the supported versions listed", func() {
_, err := service.Resolve(path, "some-entry", "9.9.9", "some-stack")
Expect(err).To(MatchError(ContainSubstring("failed to satisfy \"some-entry\" dependency version constraint \"9.9.9\": no compatible versions. Supported versions are: [1.2.3, 4.5.6]")))
Expect(err).To(MatchError(ContainSubstring("failed to satisfy \"some-entry\" dependency version constraint \"9.9.9\": no compatible versions on \"some-stack\" stack. Supported versions are: [1.2.3, 4.5.6]")))
})
})
})
Expand Down

0 comments on commit 93ac16d

Please sign in to comment.