MCPcopy Index your code
hub / github.com/jetify-com/devbox / installCmdFunc

Function installCmdFunc

internal/boxcli/install.go:45–69  ·  view source on GitHub ↗
(cmd *cobra.Command, flags installCmdFlags)

Source from the content-addressed store, hash-verified

43}
44
45func installCmdFunc(cmd *cobra.Command, flags installCmdFlags) error {
46 // Check the directory exists.
47 box, err := devbox.Open(&devopt.Opts{
48 Dir: flags.config.path,
49 Environment: flags.config.environment,
50 Stderr: cmd.ErrOrStderr(),
51 })
52 if err != nil {
53 return errors.WithStack(err)
54 }
55 ctx := cmd.Context()
56 if flags.tidyLockfile {
57 ctx = ux.HideMessage(ctx, devpkg.MissingStorePathsWarning)
58 }
59 if err = box.Install(ctx); err != nil {
60 return errors.WithStack(err)
61 }
62 if flags.tidyLockfile {
63 if err = box.FixMissingStorePaths(ctx); err != nil {
64 return errors.WithStack(err)
65 }
66 }
67 fmt.Fprintln(cmd.ErrOrStderr(), "Finished installing packages.")
68 return nil
69}

Callers 2

pullCmdFuncFunction · 0.85
installCmdFunction · 0.85

Calls 4

OpenFunction · 0.92
HideMessageFunction · 0.92
FixMissingStorePathsMethod · 0.80
InstallMethod · 0.45

Tested by

no test coverage detected