mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
support custom data dir with BITWARDENCLI_APPDATA_DIR
This commit is contained in:
parent
7abc87992a
commit
c62c28677a
@ -13,7 +13,9 @@ export class LowdbStorageService implements StorageService {
|
|||||||
|
|
||||||
constructor(appDirName: string) {
|
constructor(appDirName: string) {
|
||||||
let p = null;
|
let p = null;
|
||||||
if (process.platform === 'darwin') {
|
if (process.env.BITWARDENCLI_APPDATA_DIR) {
|
||||||
|
p = path.resolve(process.env.BITWARDENCLI_APPDATA_DIR);
|
||||||
|
} else if (process.platform === 'darwin') {
|
||||||
p = path.join(process.env.HOME, 'Library/Application Support', appDirName);
|
p = path.join(process.env.HOME, 'Library/Application Support', appDirName);
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
p = path.join(process.env.APPDATA, appDirName);
|
p = path.join(process.env.APPDATA, appDirName);
|
||||||
|
Loading…
Reference in New Issue
Block a user