We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27ec121 commit b2f11ccCopy full SHA for b2f11cc
configuration/configuration.go
@@ -46,11 +46,11 @@ func Init(configPath string) {
46
// Get default data path if none was provided
47
if configPath == "" {
48
configPath = getDefaultArduinoDataDir()
49
+ viper.AddConfigPath(configPath)
50
+ } else {
51
+ viper.AddConfigPath(filepath.Dir(configPath))
52
}
53
- // Add paths where to search for a config file
- viper.AddConfigPath(filepath.Dir(configPath))
-
54
// Bind env vars
55
viper.SetEnvPrefix("ARDUINO")
56
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
0 commit comments