MCPcopy
hub / github.com/containers/toolbox / rootHelp

Function rootHelp

src/cmd/root.go:186–214  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

184}
185
186func rootHelp(cmd *cobra.Command, args []string) {
187 if utils.IsInsideContainer() {
188 if !utils.IsInsideToolboxContainer() {
189 fmt.Fprintf(os.Stderr, "Error: this is not a Toolbx container\n")
190 return
191 }
192
193 if _, err := utils.ForwardToHost(); err != nil {
194 fmt.Fprintf(os.Stderr, "Error: %s\n", err)
195 return
196 }
197
198 return
199 }
200
201 manual := "toolbox"
202
203 for _, arg := range args {
204 if !strings.HasPrefix(arg, "-") {
205 manual = manual + "-" + arg
206 break
207 }
208 }
209
210 if err := showManual(manual); err != nil {
211 fmt.Fprintf(os.Stderr, "Error: %s\n", err)
212 return
213 }
214}
215
216func rootRun(cmd *cobra.Command, args []string) error {
217 return rootRunImpl(cmd, args)

Callers

nothing calls this directly

Calls 1

showManualFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…