Skip to content

Commit 93ac16d

Browse files
Ryan MoranForestEckhardt
Ryan Moran
authored andcommitted
Adds stack to error message in postal
1 parent 05da1f0 commit 93ac16d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

postal/service.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ func (s Service) Resolve(path, id, version, stack string) (Dependency, error) {
120120

121121
if len(compatibleVersions) == 0 {
122122
return Dependency{}, fmt.Errorf(
123-
"failed to satisfy %q dependency version constraint %q: no compatible versions. Supported versions are: [%s]",
123+
"failed to satisfy %q dependency version constraint %q: no compatible versions on %q stack. Supported versions are: [%s]",
124124
id,
125125
version,
126+
stack,
126127
strings.Join(supportedVersions, ", "),
127128
)
128129
}

postal/service_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ version = "this is super not semver"
307307
context("when the entry version constraint cannot be satisfied", func() {
308308
it("returns an error with all the supported versions listed", func() {
309309
_, err := service.Resolve(path, "some-entry", "9.9.9", "some-stack")
310-
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]")))
310+
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]")))
311311
})
312312
})
313313
})

0 commit comments

Comments
 (0)