Blame SOURCES/0001-feat-default-config-file-location.patch
|
|
d60c09 |
--- main.go.orig 2022-02-11 15:41:53.199642591 -0500
|
|
|
d60c09 |
+++ main.go 2022-02-11 15:42:43.738219604 -0500
|
|
|
d60c09 |
@@ -6,6 +6,7 @@
|
|
|
d60c09 |
"fmt"
|
|
|
d60c09 |
"net"
|
|
|
d60c09 |
"os"
|
|
|
d60c09 |
+ "path/filepath"
|
|
|
d60c09 |
"strconv"
|
|
|
d60c09 |
"strings"
|
|
|
d60c09 |
"time"
|
|
|
d60c09 |
@@ -21,7 +22,7 @@
|
|
|
d60c09 |
)
|
|
|
d60c09 |
|
|
|
d60c09 |
func main() {
|
|
|
d60c09 |
- fs := flag.NewFlagSet("yggd-package-manager-worker", flag.ExitOnError)
|
|
|
d60c09 |
+ fs := flag.NewFlagSet(filepath.Base(os.Args[0]), flag.ExitOnError)
|
|
|
d60c09 |
|
|
|
d60c09 |
var (
|
|
|
d60c09 |
socketAddr = ""
|
|
|
d60c09 |
@@ -32,7 +33,7 @@
|
|
|
d60c09 |
fs.StringVar(&socketAddr, "socket-addr", "", "dispatcher socket address")
|
|
|
d60c09 |
fs.Var(&logLevel, "log-level", "log verbosity level (error (default), warn, info, debug, trace)")
|
|
|
d60c09 |
fs.Var(&allowPatterns, "allow-pattern", "regular expression pattern to allow package operations\n(can be specified multiple times)")
|
|
|
d60c09 |
- _ = fs.String("config", "", "path to `file` containing configuration values (optional)")
|
|
|
d60c09 |
+ _ = fs.String("config", filepath.Join("/", "etc", "rhc", "workers", "rhc-package-manager.toml"), "path to `file` containing configuration values (optional)")
|
|
|
d60c09 |
|
|
|
d60c09 |
ff.Parse(fs, os.Args[1:], ff.WithEnvVarPrefix("YGG"), ff.WithConfigFileFlag("config"), ff.WithConfigFileParser(fftoml.Parser))
|
|
|
d60c09 |
|