Skip to content

Commit

Permalink
fix: print help when no command is passed (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
doron-cohen committed Dec 8, 2020
1 parent 6316e35 commit fb660ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ var rootCmd = &cobra.Command{
Use: "antidot",
Short: "Clean your $HOME from those pesky dotfiles",
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
cmd.Help()
os.Exit(0)
}
},
}

Expand Down

0 comments on commit fb660ea

Please sign in to comment.