Skip to content

Commit 7150481

Browse files
authored
Disable PreRunE check for Nix when passing no-install flag on update cmd (#2554)
1 parent 25d39f0 commit 7150481

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/boxcli/update.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ func updateCmd() *cobra.Command {
3030
"If no packages are specified, all packages will be updated. " +
3131
"Legacy non-versioned packages will be converted to @latest versioned " +
3232
"packages resolved to their current version.",
33-
PreRunE: ensureNixInstalled,
33+
PreRunE: func(cmd *cobra.Command, args []string) error {
34+
if flags.noInstall {
35+
return nil
36+
}
37+
return ensureNixInstalled(cmd, args)
38+
},
3439
RunE: func(cmd *cobra.Command, args []string) error {
3540
return updateCmdFunc(cmd, args, flags)
3641
},

0 commit comments

Comments
 (0)