From 35f39733653ed1764b9986919e6938226b87c44b Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Fri, 10 Aug 2018 14:20:57 -0400 Subject: [PATCH 1/2] fix panic for job history cli command when used with non-existent job version --- command/job_history.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/job_history.go b/command/job_history.go index ba55d67bcb2..a065bbf6838 100644 --- a/command/job_history.go +++ b/command/job_history.go @@ -248,6 +248,10 @@ func (c *JobHistoryCommand) formatJobVersions(versions []*api.Job, diffs []*api. } func (c *JobHistoryCommand) formatJobVersion(job *api.Job, diff *api.JobDiff, nextVersion uint64, full bool) error { + if job == nil { + return fmt.Errorf("Error printing job history for non-existant job or job version") + } + basic := []string{ fmt.Sprintf("Version|%d", *job.Version), fmt.Sprintf("Stable|%v", *job.Stable), From 1ec0852484f8667235ef416b4628297b247423b6 Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Tue, 14 Aug 2018 14:06:04 -0400 Subject: [PATCH 2/2] spelling fix --- command/job_history.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/job_history.go b/command/job_history.go index a065bbf6838..73508ac22de 100644 --- a/command/job_history.go +++ b/command/job_history.go @@ -249,7 +249,7 @@ func (c *JobHistoryCommand) formatJobVersions(versions []*api.Job, diffs []*api. func (c *JobHistoryCommand) formatJobVersion(job *api.Job, diff *api.JobDiff, nextVersion uint64, full bool) error { if job == nil { - return fmt.Errorf("Error printing job history for non-existant job or job version") + return fmt.Errorf("Error printing job history for non-existing job or job version") } basic := []string{