fix(ui): Dynamically generate path to config in warning message (#851)
parent
e4f9b8a984
commit
b531a642f6
@ -1,8 +1,16 @@
|
||||
import { existsSync } from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
const DOCKER_PATH = path.join(__dirname, '../../config/DOCKER');
|
||||
const CONFIG_PATH = process.env.CONFIG_DIRECTORY
|
||||
? process.env.CONFIG_DIRECTORY
|
||||
: path.join(__dirname, '../../config');
|
||||
|
||||
const DOCKER_PATH = `${CONFIG_PATH}/DOCKER`;
|
||||
|
||||
export const appDataStatus = (): boolean => {
|
||||
return !existsSync(DOCKER_PATH);
|
||||
};
|
||||
|
||||
export const appDataPath = (): string => {
|
||||
return CONFIG_PATH;
|
||||
};
|
||||
|
Loading…
Reference in new issue