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

This commit is contained in:
Jose Diaz-Gonzalez committed 2024-03-14 08:16:55 -04:00
1 parent 5a5531bce3
commit 41b0898db9
1 file changed
+5
+5
View File
@@ -14,6 +14,7 @@ import (
func main() { func main() {
parts := strings.Split(os.Args[0], "/") parts := strings.Split(os.Args[0], "/")
trigger := parts[len(parts)-1] trigger := parts[len(parts)-1]
global := flag.Bool("global", false, "--global: Whether global or app-specific")
flag.Parse() flag.Parse()
var err error var err error
@@ -21,6 +22,10 @@ func main() {
case "cron-get-property": case "cron-get-property":
appName := flag.Arg(0) appName := flag.Arg(0)
property := flag.Arg(1) property := flag.Arg(1)
if *global {
appName = "--global"
property = flag.Arg(0)
}
err = cron.TriggerCronGetProperty(appName, property) err = cron.TriggerCronGetProperty(appName, property)
case "install": case "install":
err = cron.TriggerInstall() err = cron.TriggerInstall()