mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-12-04 04:37:22 +00:00
Fix: [ALAS] Should check current path first
This commit is contained in:
parent
2c859504ac
commit
701df396cc
@ -8,7 +8,7 @@ import fs from 'fs';
|
|||||||
*/
|
*/
|
||||||
const getAlasABSPath = (
|
const getAlasABSPath = (
|
||||||
files: string[] = ['**/config/deploy.yaml', '**/config/deploy.template.yaml'],
|
files: string[] = ['**/config/deploy.yaml', '**/config/deploy.template.yaml'],
|
||||||
rootName: string | string[] = ['AzurLaneAutoScript', 'Alas', 'StarRailCopilot'],
|
rootName: string | string[] = ['AzurLaneAutoScript', 'Alas', 'StarRailCopilot', 'SRC'],
|
||||||
) => {
|
) => {
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const sep = path.sep;
|
const sep = path.sep;
|
||||||
@ -53,7 +53,6 @@ const getAlasABSPath = (
|
|||||||
const appAbsPathArr = appAbsPath.split(sep);
|
const appAbsPathArr = appAbsPath.split(sep);
|
||||||
let flag = false;
|
let flag = false;
|
||||||
while (step > 0 && !flag) {
|
while (step > 0 && !flag) {
|
||||||
appAbsPathArr.pop();
|
|
||||||
const entries = fg.sync(files, {
|
const entries = fg.sync(files, {
|
||||||
dot: true,
|
dot: true,
|
||||||
cwd: appAbsPathArr.join(sep) as string,
|
cwd: appAbsPathArr.join(sep) as string,
|
||||||
@ -63,6 +62,7 @@ const getAlasABSPath = (
|
|||||||
alasABSPath = appAbsPathArr.join(sep);
|
alasABSPath = appAbsPathArr.join(sep);
|
||||||
}
|
}
|
||||||
step--;
|
step--;
|
||||||
|
appAbsPathArr.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user