Skip to content

Commit

Permalink
error sensibly if checkpoint response blank
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed Jul 1, 2020
1 parent 23a6914 commit abd0af9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tfinstall/tfinstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ func latestVersion() (string, error) {
return "", err
}

if resp.CurrentVersion == "" {
return "", fmt.Errorf("could not determine latest version of terraform using checkpoint: CHECKPOINT_DISABLE may be set")
}

return resp.CurrentVersion, nil
}

Expand Down

0 comments on commit abd0af9

Please sign in to comment.