Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
fix: version compare
Browse files Browse the repository at this point in the history
  • Loading branch information
ChingCdesu committed Aug 31, 2023
1 parent f0830a5 commit 731914b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/main/coreLoader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,12 @@ class CoreLoader {
const currentVersionFile = path.join(getAppBaseDir(), 'core', 'version')
const currentVersion = existsSync(currentVersionFile)
? readFileSync(currentVersionFile, 'utf-8')
: 'CUR_NOT_FOUND'
: null
const upgradeVersionFile = path.join(getAppBaseDir(), 'core', 'upgradable')
const upgradeVersion = existsSync(upgradeVersionFile)
? readFileSync(upgradeVersionFile, 'utf-8')
: 'UPG_NOT_FOUND'
if (currentVersion !== upgradeVersion) {
: null
if (currentVersion && upgradeVersion && currentVersion !== upgradeVersion) {
const upgradeFilePath = path.join(getAppBaseDir(), 'core', 'upgrade')
const upgradeFileName = existsSync(upgradeFilePath)
? readFileSync(upgradeFilePath, 'utf-8')
Expand Down

0 comments on commit 731914b

Please sign in to comment.