strip newline characters from stored version

This commit is contained in:
Stephanie You
2023-12-11 15:09:30 -08:00
parent c63435889a
commit e37aa07463

View File

@@ -148,7 +148,7 @@ func checkAndPrintVersionOutOfDateWarning(curVersion string, dEnv *env.DoltEnv)
return errhand.BuildDError("error: failed to read version check file").AddCause(err).Build()
}
latestRelease = string(vCheck)
latestRelease = strings.ReplaceAll(string(vCheck), "\n", "")
lastCheckDate, _ := dEnv.FS.LastModified(path)
if lastCheckDate.Before(time.Now().AddDate(0, 0, -7)) {
latestRelease, verr = getLatestDoltReleaseAndRecord(path, dEnv)