Skip to content

Commit b678983

Browse files
authored
fix: ensure missing package dependencies trigger a sync (#340)
This manifested because the gradle package depends on "jre". The installed JRE satisfied this constraint initially but was later upgraded. Because dependency resolving didn't set syncOnMissing, this resulted in a "package not found" error.
1 parent 7a5229c commit b678983

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/exec_cmd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ func (e *execCmd) Run(l *ui.UI, cache *cache.Cache, sta *state.State, env *hermi
7070
return errors.WithStack(err)
7171
}
7272

73-
// Collect dependencies we might have to install
74-
// if they are not in the cache
73+
// Collect dependencies we might have to install if they are not in the
74+
// cache
7575
deps := map[string]*manifest.Package{}
7676
err = env.ResolveWithDeps(l, installed, manifest.ExactSelector(pkg.Reference), deps)
7777
if err != nil {

env.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,7 @@ func (e *Env) ResolveWithDeps(l *ui.UI, installed []manifest.Reference, selector
13141314
return nil
13151315
}
13161316
}
1317-
pkg, err := e.Resolve(l, selector, false)
1317+
pkg, err := e.Resolve(l, selector, true)
13181318
if err != nil {
13191319
return errors.WithStack(err)
13201320
}

0 commit comments

Comments
 (0)