修复 linux 依赖是否存在判断

This commit is contained in:
whyour
2023-07-24 22:02:26 +08:00
parent 04edd97967
commit 8b0dedaf8c
8 changed files with 11 additions and 10 deletions
+3
View File
@@ -20,6 +20,7 @@ const rootPath = process.env.QL_DIR as string;
const envFound = dotenv.config({ path: path.join(rootPath, '.env') });
const dataPath = path.join(rootPath, 'data/');
const shellPath = path.join(rootPath, 'shell/');
const tmpPath = path.join(rootPath, '.tmp/');
const samplePath = path.join(rootPath, 'sample/');
const configPath = path.join(dataPath, 'config/');
@@ -44,6 +45,7 @@ const loginFaild = '请先登录!';
const configString = 'config sample crontab shareCode diy';
const versionFile = path.join(rootPath, 'version.yaml');
const dataTgzFile = path.join(tmpPath, 'data.tgz');
const shareShellFile = path.join(shellPath, 'share.sh');
if (envFound.error) {
throw new Error("⚠️ Couldn't find .env file ⚠️");
@@ -64,6 +66,7 @@ export default {
tmpPath,
dataPath,
dataTgzFile,
shareShellFile,
configString,
loginFaild,
authError,