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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user