Skip to content

Commit d4f5af0

Browse files
committed
Add global config path for Linux
1 parent 4da297f commit d4f5af0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package config
33
import (
44
"fmt"
55
"os"
6+
"runtime"
67

78
"github.com/spf13/viper"
89
)
@@ -21,7 +22,11 @@ func init() {
2122
config.SetConfigName("config")
2223
config.SetConfigType("yaml")
2324

25+
// TODO: proper global config path setup
2426
sep := string(os.PathSeparator)
27+
if runtime.GOOS == "linux" {
28+
config.AddConfigPath("/etc/mcli")
29+
}
2530
config.AddConfigPath(dir + sep + "modem-cli")
2631

2732
// -- Defaults -- //

0 commit comments

Comments
 (0)