🐛 Fix: settings bug

ISSUES CLOSED: #710
This commit is contained in:
PiEgg
2021-08-13 00:18:04 +08:00
parent ae692632a5
commit 20d3cf987c
5 changed files with 39 additions and 25 deletions

View File

@@ -1,19 +1,12 @@
import fs from 'fs-extra'
import path from 'path'
import os from 'os'
import pkg from 'root/package.json'
import { dbPathChecker } from 'apis/core/datastore/dbChecker'
const configPath = dbPathChecker()
const CONFIG_DIR = path.dirname(configPath)
function injectPicGoVersion () {
global.PICGO_GUI_VERSION = pkg.version
global.PICGO_CORE_VERSION = pkg.dependencies.picgo.replace('^', '')
}
function beforeOpen () {
injectPicGoVersion()
if (process.platform === 'darwin') {
resolveMacWorkFlow()
}