mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Fix config path regression (#1996)
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
@@ -73,7 +74,7 @@ func initConfig(instance *Instance, flags flagStruct) error {
|
|||||||
v.SetConfigName("config")
|
v.SetConfigName("config")
|
||||||
|
|
||||||
v.AddConfigPath(".") // Look for config in the working directory
|
v.AddConfigPath(".") // Look for config in the working directory
|
||||||
v.AddConfigPath("$HOME/.stash") // Look for the config in the home directory
|
v.AddConfigPath(filepath.FromSlash("$HOME/.stash")) // Look for the config in the home directory
|
||||||
|
|
||||||
configFile := ""
|
configFile := ""
|
||||||
envConfigFile := os.Getenv("STASH_CONFIG_FILE")
|
envConfigFile := os.Getenv("STASH_CONFIG_FILE")
|
||||||
|
|||||||
Reference in New Issue
Block a user