From 81b545f86896f0a190a47d8b6f6dc30fa5c56e9d Mon Sep 17 00:00:00 2001 From: Paulo Truta Date: Sat, 22 May 2021 13:30:23 +0000 Subject: [PATCH] Fix wrong handling of task arguments in systemIterator --- cmd/edgeboxctl/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/edgeboxctl/main.go b/cmd/edgeboxctl/main.go index c60516e..e8f5b22 100644 --- a/cmd/edgeboxctl/main.go +++ b/cmd/edgeboxctl/main.go @@ -115,7 +115,11 @@ func systemIterator(name *string, tick int) { tasks.ExecuteSchedules(tick) nextTask := tasks.GetNextTask() if nextTask.Task != "" { - log.Printf("Executing task %s / Args: %s", nextTask.Task, nextTask.Args) + taskArguments := "No arguments" + if nextTask.Args.Valid { + taskArguments = nextTask.Args.String + } + log.Printf("Executing task %s / Args: %s", nextTask.Task, taskArguments) tasks.ExecuteTask(nextTask) } else { log.Printf("No tasks to execute.")