Skip to content

Commit 2fe0cd2

Browse files
authored
fix: add-digests didn't have the state dir populated (#508)
This resulted in `${root}` being evaluated to the empty string. I'm not sure why this didn't cause many more problems, but it only seemed to manifest in a couple of packages.
1 parent dd5ca73 commit 2fe0cd2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

manifest/digest/digest.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ func UpdateDigests(l *ui.UI, client *http.Client, state *state.State, path strin
3838
pkgsBySource := map[string]pkgAndref{}
3939
for _, ref := range mani.References(name) {
4040
for _, p := range slices.Concat(platform.Core, platform.Optional) {
41-
config := manifest.Config{Env: ".", State: "/tmp", Platform: p}
41+
config := manifest.Config{
42+
Env: ".", // Should be unused, so we don't need a real value here...hopefully.
43+
State: state.Root(),
44+
PkgDir: state.PkgDir(),
45+
Platform: p,
46+
}
4247
pkg, err := manifest.Resolve(mani, config, ref)
4348
if errors.Is(err, manifest.ErrNoSource) {
4449
maybeWarnf(task, p, "No source provided for %s/%s", ref, p)

0 commit comments

Comments
 (0)