Skip to content

Commit 68a9b9b

Browse files
authored
[profile remove] if package was not found, change message from error to info (#1458)
## Summary When trying to remove a package, or update a package, we'd print a message like below if the package was not found in the profile. ``` Error: Package uxn@latest not found in profile. Skipping. ``` This is confusing for a few reasons: 1. Devbox users are not usually aware of a concept called "profile". This is a nix-ism that is seeping through our messaging. 2. Even if they understand "nix profile", there's nothing actionable about this message. Their package is still removed from devbox.json and the shell environment (which is what they care about). Instead, we can make this a debug.Log, and not bother users with it. ## How was it tested? didn't explicitly test. Compiles.
1 parent 8c334f0 commit 68a9b9b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/impl/packages.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,8 @@ func (d *Devbox) removePackagesFromProfile(ctx context.Context, pkgs []string) e
376376
ProfileDir: profileDir,
377377
})
378378
if err != nil {
379-
ux.Ferror(
380-
d.writer,
381-
"Package %s not found in profile. Skipping.\n",
379+
debug.Log(
380+
"Info: Package %s not found in nix profile. Skipping removing from profile.\n",
382381
pkg.Raw,
383382
)
384383
continue

0 commit comments

Comments
 (0)