diff --git a/cmd/skywire-node/commands/root.go b/cmd/skywire-node/commands/root.go index 7f97e78b07..1d2a6f8d9c 100644 --- a/cmd/skywire-node/commands/root.go +++ b/cmd/skywire-node/commands/root.go @@ -9,13 +9,14 @@ import ( "syscall" "time" - "github.com/skycoin/skywire/internal/pathutil" - "github.com/spf13/cobra" + "github.com/skycoin/skywire/internal/pathutil" "github.com/skycoin/skywire/pkg/node" ) +const configEnv = "SW_CONFIG" + var rootCmd = &cobra.Command{ Use: "skywire-node [skywire.json]", Short: "App Node for skywire", @@ -23,7 +24,7 @@ var rootCmd = &cobra.Command{ var configFile string if len(args) > 0 { configFile = args[0] - } else if conf, ok := os.LookupEnv("SKYWIRE_CONFIG"); ok { + } else if conf, ok := os.LookupEnv(configEnv); ok { configFile = conf } else { conf, err := pathutil.Find("skywire.json") @@ -33,7 +34,7 @@ var rootCmd = &cobra.Command{ configFile = conf } - log.Println("using conf file at: ", configFile) + log.Println("using conf file at:", configFile) file, err := os.Open(configFile) if err != nil {