Skip to content

Commit 6d9ea74

Browse files
authored
[update] change Error: to Warning: for failed attempt to upgrade flake (#1773)
## Summary When I modified the `examples/flakes/php` to omit `ds` extension and did `devbox update`, then the output alarmed me at first. The Error made me think something drastic went wrong. But in this case, since its an "attempt", I think we should make it a Warning or even an Info. ``` ❯ devbox update Info: Attempting to upgrade path:my-php-flake#php using `nix profile upgrade` Error: Failed to upgrade path:my-php-flake#php using `nix profile upgrade`: php: package not found Info: Attempting to upgrade path:my-php-flake#hello using `nix profile upgrade` Error: Failed to upgrade path:my-php-flake#hello using `nix profile upgrade`: hello: package not found Info: Already up-to-date ripgrep@latest 14.1.0 [1/2] php [1/2] php: Success [2/2] hello [2/2] hello: Success ✓ Computed the Devbox environment. Info: Removing [email protected] Warning: Your shell environment may be out of date. Run `refresh` to update it. Info: Running "nix flake update" (devbox) ``` ## How was it tested? ``` ❯ devbox update Info: Attempting to upgrade path:my-php-flake#php using `nix profile upgrade` Warning: Failed to upgrade path:my-php-flake#php using `nix profile upgrade`: php: package not found Info: Attempting to upgrade path:my-php-flake#hello using `nix profile upgrade` Warning: Failed to upgrade path:my-php-flake#hello using `nix profile upgrade`: hello: package not found Info: Already up-to-date ripgrep@latest 14.1.0 [1/2] php [1/2] php: Success [2/2] hello [2/2] hello: Success ✓ Computed the Devbox environment. Info: Removing [email protected] Warning: Your shell environment may be out of date. Run `refresh` to update it. Info: Running "nix flake update" (devbox) ```
1 parent 12f2daf commit 6d9ea74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/devbox/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (d *Devbox) attemptToUpgradeFlake(pkg *devpkg.Package) error {
183183

184184
err = nixprofile.ProfileUpgrade(profilePath, pkg, d.lockfile)
185185
if err != nil {
186-
ux.Ferror(
186+
ux.Fwarning(
187187
d.stderr,
188188
"Failed to upgrade %s using `nix profile upgrade`: %s\n",
189189
pkg.Raw,

0 commit comments

Comments
 (0)