Skip to content

Commit

Permalink
fix: fixed version comparison not taking into account missing version…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
SeanLatimer committed Mar 10, 2021
1 parent 1bc2e8d commit a6a307b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ func writeVersionFile(version string, path string) error {

// compareVersion will return true if versions match, false if otherwise
func compareVersion(version string, path string) (bool, error) {
if !fileExists(path) {
return false, nil
}

bytes, err := ioutil.ReadFile(path)
if err != nil {
return false, err
Expand Down

0 comments on commit a6a307b

Please sign in to comment.