From a6a307b281cf167e78290953bd799ea4d609d03b Mon Sep 17 00:00:00 2001 From: Sean Latimer Date: Wed, 10 Mar 2021 20:15:09 +0000 Subject: [PATCH] fix: fixed version comparison not taking into account missing version file --- util.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util.go b/util.go index 8cb14be..3f0889a 100644 --- a/util.go +++ b/util.go @@ -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