Skip to content

Commit

Permalink
Only force needsPackageDir if we have packages to install (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
blast-hardcheese authored Aug 12, 2024
1 parent 2b68f9a commit 05c9a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cli/cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func maybeInstall(ctx context.Context, b api.LanguageBackend, forceInstall bool)
return
}
var needsPackageDir bool
if packageDir := b.GetPackageDir(); packageDir != "" {
if packageDir := b.GetPackageDir(); len(b.ListSpecfile(false)) > 0 && packageDir != "" {
needsPackageDir = !util.Exists(packageDir)
}
if forceInstall || store.HasSpecfileChanged(b) || needsPackageDir {
Expand Down

0 comments on commit 05c9a22

Please sign in to comment.