fix(core): update
This commit is contained in:
parent
45ebf0944c
commit
dc59682c15
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/npmextra',
|
name: '@push.rocks/npmextra',
|
||||||
version: '4.0.1',
|
version: '4.0.2',
|
||||||
description: 'do more with npm'
|
description: 'do more with npm'
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,16 @@ export class AppData {
|
|||||||
} else {
|
} else {
|
||||||
const appDataDir = '/app/data';
|
const appDataDir = '/app/data';
|
||||||
const dataDir = '/data';
|
const dataDir = '/data';
|
||||||
|
const nogitAppData = '.nogit/appdata';
|
||||||
const appDataExists = plugins.smartfile.fs.isDirectory(appDataDir);
|
const appDataExists = plugins.smartfile.fs.isDirectory(appDataDir);
|
||||||
const dataExists = plugins.smartfile.fs.isDirectory(dataDir);
|
const dataExists = plugins.smartfile.fs.isDirectory(dataDir);
|
||||||
if (appDataExists) {
|
if (appDataExists) {
|
||||||
this.dirPathArg = appDataDir;
|
this.dirPathArg = appDataDir;
|
||||||
|
} else if (dataExists) {
|
||||||
this.dirPathArg = dataDir;
|
this.dirPathArg = dataDir;
|
||||||
|
} else {
|
||||||
|
await plugins.smartfile.fs.ensureDir(nogitAppData);
|
||||||
|
this.dirPathArg = nogitAppData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.kvStore = new KeyValueStore('custom', 'appkv', this.dirPathArg);
|
this.kvStore = new KeyValueStore('custom', 'appkv', this.dirPathArg);
|
||||||
|
Loading…
Reference in New Issue
Block a user