fix: properly support the --global flag when detecting the scheduler

Previously this caused errors when fetching the global scheduler.
This commit is contained in:
Jose Diaz-Gonzalez committed 2022-01-27 22:16:22 -05:00
1 parent faf204c03a
commit 02927b3866
2 files changed
+11 -4

No files matched your search

+5 -3
View File
@@ -9,9 +9,11 @@ import (
// TriggerSchedulerDetect outputs a manually selected scheduler for the app
func TriggerSchedulerDetect(appName string) error {
if scheduler := common.PropertyGet("scheduler", appName, "selected"); scheduler != "" {
fmt.Println(scheduler)
return nil
if appName != "--global" {
if scheduler := common.PropertyGet("scheduler", appName, "selected"); scheduler != "" {
fmt.Println(scheduler)
return nil
}
}
if scheduler := common.PropertyGet("scheduler", "--global", "selected"); scheduler != "" {