From 5ac621921bd7391fcef79cccc14190b111face18 Mon Sep 17 00:00:00 2001 From: Ioan Damian Date: Thu, 12 Sep 2024 09:03:43 +0200 Subject: [PATCH] Fix: errors reported by golangci-lint: S1009: should omit nil check; printf: non-constant format string --- internal/awx/resource_job_template_launch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/awx/resource_job_template_launch.go b/internal/awx/resource_job_template_launch.go index b0df6f6a..b7caa6da 100644 --- a/internal/awx/resource_job_template_launch.go +++ b/internal/awx/resource_job_template_launch.go @@ -128,7 +128,7 @@ func resourceJobTemplateLaunchCreate(ctx context.Context, d *schema.ResourceData if d.Get("wait_for_completion").(bool) { err = jobTemplateLaunchWait(ctx, client.JobService, res, d.Timeout(schema.TimeoutCreate)) - if err != nil { + if err != nil && len(err.Error()) > 0 { return utils.Diagf( "JobTemplate execution failure", fmt.Sprintf("JobTemplateLaunch with ID %d and template ID %d, failed to complete %s", res.ID, d.Get("job_template_id").(int), err.Error()),