runRoot implements the main rclone command with no subcommands
(cmd *cobra.Command, args []string)
| 114 | |
| 115 | // runRoot implements the main rclone command with no subcommands |
| 116 | func runRoot(cmd *cobra.Command, args []string) { |
| 117 | if version { |
| 118 | ShowVersion() |
| 119 | resolveExitCode(nil) |
| 120 | } else { |
| 121 | _ = cmd.Usage() |
| 122 | if len(args) > 0 { |
| 123 | _, _ = fmt.Fprintf(os.Stderr, "Command not found.\n") |
| 124 | } |
| 125 | resolveExitCode(errorCommandNotFound) |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | // setupRootCommand sets default usage, help, and error handling for |
| 130 | // the root command. |
nothing calls this directly
no test coverage detected
searching dependent graphs…