Fix config path not correct on all platforms
This commit is contained in:
parent
4724e7d806
commit
645a485daa
@ -18,6 +18,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"appdata-path": "^1.0.0",
|
||||
"ejs": "^3.0.1",
|
||||
"electron-updater": "^4.2.4",
|
||||
"esm": "^3.2.25",
|
||||
|
@ -1,11 +1,11 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import {homedir} from "os";
|
||||
import getAppDataPath from "appdata-path";
|
||||
|
||||
import Service from "./Service";
|
||||
import Meta from "./Meta";
|
||||
|
||||
const configDir = Meta.isDevMode() ? path.resolve(homedir(), '.config/tabs-app-dev') : path.resolve(homedir(), '.config/tabs-app');
|
||||
const configDir = Meta.isDevMode() ? getAppDataPath('tabs-app-dev') : getAppDataPath('tabs-app');
|
||||
const configFile = path.resolve(configDir, 'config.json');
|
||||
|
||||
export default class Config {
|
||||
|
@ -169,6 +169,11 @@ app-builder-lib@22.6.1:
|
||||
semver "^7.3.2"
|
||||
temp-file "^3.3.7"
|
||||
|
||||
appdata-path@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/appdata-path/-/appdata-path-1.0.0.tgz#c4022d0b6727d1ddc1dd7ecec143d4352f3eefad"
|
||||
integrity sha512-ZbH3ezXfnT/YE3NdqduIt4lBV+H0ybvA2Qx3K76gIjQvh8gROpDFdDLpx6B1QJtW7zxisCbpTlCLhKqoR8cDBw==
|
||||
|
||||
argparse@^1.0.7:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||
|
Loading…
Reference in New Issue
Block a user