Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xm1k3 committed Jun 3, 2021
1 parent 3bf5949 commit e80c853
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cent update -h
Example
```
▶ cent -p {YOUR PATH} -n community-nuclei-templates -k
▶ cent update -d -f
▶ cent update -p {YOUR PATH} -d -f
```


Expand Down
11 changes: 7 additions & 4 deletions cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ var updateCmd = &cobra.Command{
path, _ := rootCmd.PersistentFlags().GetString("path")
directories, _ := cmd.Flags().GetBool("directories")
files, _ := cmd.Flags().GetBool("files")
if directories || files {
fmt.Println(directories, files, "Stonks")
jobs.UpdateRepo(path, directories, files)
if path != "" {
if directories || files {
jobs.UpdateRepo(path, directories, files)
} else {
fmt.Println(color.YellowString("[!] See avaiable flags"))
}
} else {
fmt.Println(color.YellowString("[!] See avaiable flags"))
fmt.Println(color.YellowString("[!] Set path flag"))
}
},
}
Expand Down

0 comments on commit e80c853

Please sign in to comment.