refactor: home环境变量

This commit is contained in:
xiaojunnuo
2021-01-08 10:32:58 +08:00
parent 2f3db7d982
commit 44326c3abe
2 changed files with 3 additions and 3 deletions
+2 -1
View File
@@ -5,9 +5,10 @@ const logger = util.logger
export class FileStore extends Store {
constructor (opts) {
super()
this.rootDir = util.path.getUserBasePath()
if (opts.rootDir != null) {
this.rootDir = opts.rootDir
} else {
this.rootDir = util.path.getUserBasePath()
}
if (opts.test) {
this.rootDir = path.join(this.rootDir, '/test/')