|
@@ -68,6 +68,10 @@ func help() {
|
|
|
}
|
|
|
|
|
|
func main() {
|
|
|
+ if len(os.Args) > 1 && os.Args[1] == "help" {
|
|
|
+ help()
|
|
|
+ return
|
|
|
+ }
|
|
|
cwd, err := os.Getwd()
|
|
|
if err != nil {
|
|
|
fmt.Printf("Unable to get the current working directory: %q\n", err)
|
|
@@ -87,10 +91,6 @@ func main() {
|
|
|
subcommand.Run(repo, []string{})
|
|
|
return
|
|
|
}
|
|
|
- if os.Args[1] == "help" {
|
|
|
- help()
|
|
|
- return
|
|
|
- }
|
|
|
subcommand, ok := commands.CommandMap[os.Args[1]]
|
|
|
if !ok {
|
|
|
fmt.Printf("Unknown command: %q\n", os.Args[1])
|