(cmd *cobra.Command)
| 39 | } |
| 40 | |
| 41 | func runInstallNixCmd(cmd *cobra.Command) error { |
| 42 | if nix.BinaryInstalled() { |
| 43 | // TODO: If existing installation is not detsys, but new installation is detsys can we detect |
| 44 | // that and replace it? |
| 45 | ux.Finfof( |
| 46 | cmd.ErrOrStderr(), |
| 47 | "Nix is already installed. If this is incorrect "+ |
| 48 | "please remove the nix-shell binary from your path.\n", |
| 49 | ) |
| 50 | } |
| 51 | return new(nix.Installer).Run(cmd.Context()) |
| 52 | } |
| 53 | |
| 54 | // ensureNixInstalled verifies that nix is installed and that it is of a supported version |
| 55 | func ensureNixInstalled(cmd *cobra.Command, _args []string) error { |
no test coverage detected