fix: correct issue where cron properties cannot be retrieved if global

This commit is contained in:
Jose Diaz-Gonzalez
2024-03-14 08:16:55 -04:00
parent 5a5531bce3
commit 41b0898db9

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
@@ -21,6 +22,10 @@ func main() {
case "cron-get-property":
appName := flag.Arg(0)
property := flag.Arg(1)
if *global {
appName = "--global"
property = flag.Arg(0)
}
err = cron.TriggerCronGetProperty(appName, property)
case "install":
err = cron.TriggerInstall()