mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
Merge pull request #4577 from hashicorp/b-panic-job-history
Fix for panic when submitting non-existent version for job history CLI command
This commit is contained in:
@@ -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-existing job or job version")
|
||||
}
|
||||
|
||||
basic := []string{
|
||||
fmt.Sprintf("Version|%d", *job.Version),
|
||||
fmt.Sprintf("Stable|%v", *job.Stable),
|
||||
|
||||
Reference in New Issue
Block a user