(cmd *cobra.Command, args []string)
| 184 | } |
| 185 | |
| 186 | func 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 | |
| 216 | func rootRun(cmd *cobra.Command, args []string) error { |
| 217 | return rootRunImpl(cmd, args) |
nothing calls this directly
no test coverage detected
searching dependent graphs…