Files
macports-ports/science/scientiaCLI/files/patch-config-prefix.diff
2022-10-08 12:31:25 +01:00

15 lines
571 B
Diff

By default, scientiaCLI assumes that the config file is in the same directory as the binary.
The config file must also exist during both build time and runtime.
--- cmd/root.go.original 2022-10-08 11:31:54.000000000 +0100
+++ cmd/root.go 2022-10-08 11:44:05.000000000 +0100
@@ -31,7 +31,7 @@
if configPath == "" {
// reading the config from the executable's directory
- configPath = path.Join(path.Dir(filepath), "config.json")
+ configPath = path.Join(path.Dir(filepath), "../etc/scientiaCLI/config.json")
}
cfg, err = loadConfig(configPath)