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

Function addCmdFunc

internal/boxcli/add.go:85–108  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string, flags addCmdFlags)

Source from the content-addressed store, hash-verified

83}
84
85func addCmdFunc(cmd *cobra.Command, args []string, flags addCmdFlags) error {
86 box, err := devbox.Open(&devopt.Opts{
87 Dir: flags.config.path,
88 Environment: flags.config.environment,
89 Stderr: cmd.ErrOrStderr(),
90 })
91 if err != nil {
92 return errors.WithStack(err)
93 }
94
95 opts := devopt.AddOpts{
96 AllowInsecure: flags.allowInsecure,
97 DisablePlugin: flags.disablePlugin,
98 Platforms: flags.platforms,
99 ExcludePlatforms: flags.excludePlatforms,
100 Patch: flags.patch,
101 Outputs: flags.outputs,
102 }
103 if flags.patchGlibc {
104 // Backwards compatibility so --patch-glibc still works.
105 opts.Patch = "always"
106 }
107 return box.Add(cmd.Context(), args, opts)
108}

Callers 1

addCmdFunction · 0.85

Calls 2

OpenFunction · 0.92
AddMethod · 0.45

Tested by

no test coverage detected