fix: add support for --global as app name when calling config-get trigger

The trigger in use _should_ be config-get-global, but some calling code does not check, so adding support here will ensure the calling code gets what it expects.

Refs #5269
This commit is contained in:
Jose Diaz-Gonzalez
2022-07-29 22:44:23 -04:00
parent bfe679fb50
commit d243433625

View File

@@ -14,6 +14,7 @@ import (
func main() {
parts := strings.Split(os.Args[0], "/")
trigger := parts[len(parts)-1]
global := flag.Bool("global", false, "--global: Whether global or app-specific")
flag.Parse()
var err error
@@ -27,6 +28,10 @@ func main() {
case "config-get":
appName := flag.Arg(0)
key := flag.Arg(1)
if *global {
appName = "--global"
key = flag.Arg(0)
}
err = config.TriggerConfigGet(appName, key)
case "config-get-global":
key := flag.Arg(0)