Skip to content

Commit

Permalink
Merge pull request #67 from xm1k3/validate-fix-2
Browse files Browse the repository at this point in the history
Validate fix 2
  • Loading branch information
xm1k3 committed Dec 13, 2023
2 parents 53921b1 + cc55484 commit 5f78e9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/validate.go
Expand Up @@ -22,7 +22,7 @@ var validateCmd = &cobra.Command{
When executed, it scans a specified folder for YAML files. Each YAML file is checked for validity.
If a template is found to be invalid, it is deleted from the folder.`,
Run: func(cmd *cobra.Command, args []string) {
path, _ := rootCmd.Flags().GetString("path")
path, _ := cmd.Flags().GetString("path")

var wg sync.WaitGroup
filepath.Walk(path, func(filePath string, info os.FileInfo, err error) error {
Expand Down Expand Up @@ -67,4 +67,5 @@ func readFile(filePath string) (string, error) {

func init() {
rootCmd.AddCommand(validateCmd)
validateCmd.Flags().StringP("path", "p", "cent-nuclei-templates", "Root path to save the templates")
}
2 changes: 1 addition & 1 deletion cmd/version.go
Expand Up @@ -27,7 +27,7 @@ var versionCmd = &cobra.Command{
Short: "Print cent version",
Long: "Print cent version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Cent v1.3.1")
fmt.Println("Cent v1.3.2")
},
}

Expand Down

0 comments on commit 5f78e9f

Please sign in to comment.