mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-24 13:55:51 +00:00
use nuclei as config directory
This commit is contained in:
parent
8096737e1a
commit
a4841fbdad
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user