use nuclei as config directory

This commit is contained in:
Sajad 2022-03-10 16:20:29 +05:30 committed by GitHub
parent 8096737e1a
commit a4841fbdad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ package config
import (
"os"
"path/filepath"
"strings"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
@ -42,13 +41,11 @@ func getConfigDetails() (string, error) {
// GetConfigDir returns the nuclei configuration directory
func GetConfigDir() (string, error) {
appName := filepath.Base(os.Args[0])
appName = strings.TrimSuffix(appName, filepath.Ext(appName))
home, err := os.UserHomeDir()
if err != nil {
return "", err
}
return filepath.Join(home, ".config", appName), nil
return filepath.Join(home, ".config", "nuclei"), nil
}
// ReadConfiguration reads the nuclei configuration file from disk.