MCPcopy Create free account
hub / github.com/jetify-com/devbox / setupCmd

Function setupCmd

internal/boxcli/setup.go:17–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15const nixDaemonFlag = "daemon"
16
17func setupCmd() *cobra.Command {
18 setupCommand := &cobra.Command{
19 Use: "setup",
20 Short: "Setup devbox dependencies",
21 Hidden: true,
22 }
23
24 installNixCommand := &cobra.Command{
25 Use: "nix",
26 Short: "Install Nix",
27 RunE: func(cmd *cobra.Command, args []string) error {
28 return runInstallNixCmd(cmd)
29 },
30 }
31
32 installNixCommand.Flags().Bool(
33 nixDaemonFlag,
34 false,
35 "Install Nix in multi-user mode. This flag is not supported if you are using DetSys installer",
36 )
37 setupCommand.AddCommand(installNixCommand)
38 return setupCommand
39}
40
41func runInstallNixCmd(cmd *cobra.Command) error {
42 if nix.BinaryInstalled() {

Callers 1

RootCmdFunction · 0.85

Calls 1

runInstallNixCmdFunction · 0.85

Tested by

no test coverage detected