Skip to content

Commit

Permalink
Even reproducable package managers should force a reinstall if the pa…
Browse files Browse the repository at this point in the history
…ckage dir does not exist
  • Loading branch information
blast-hardcheese committed Aug 2, 2024
1 parent 5af79fa commit 7358b5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/cli/cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,11 @@ func maybeInstall(ctx context.Context, b api.LanguageBackend, forceInstall bool)
if !util.Exists(b.Lockfile) {
return
}
if forceInstall || store.HasLockfileChanged(b) {
var needsPackageDir bool
if packageDir := b.GetPackageDir(); packageDir != "" {
needsPackageDir = !util.Exists(packageDir)
}
if forceInstall || store.HasSpecfileChanged(b) || needsPackageDir {
b.Install(ctx)
}
} else {
Expand Down

0 comments on commit 7358b5c

Please sign in to comment.