1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-30 08:10:34 +01:00

support custom data dir with BITWARDENCLI_APPDATA_DIR

This commit is contained in:
Kyle Spearrin 2018-05-17 13:46:40 -04:00
parent 7abc87992a
commit c62c28677a

View File

@ -13,7 +13,9 @@ export class LowdbStorageService implements StorageService {
constructor(appDirName: string) {
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);
} else if (process.platform === 'win32') {
p = path.join(process.env.APPDATA, appDirName);