fix
This commit is contained in:
@@ -103,6 +103,9 @@ export class SyncBase {
|
||||
const syncList = syncKeys.map((key) => {
|
||||
const value = sync[key];
|
||||
const filepath = path.join(this.#dir, key); // 文件的路径
|
||||
if (filepath.includes('node_modules') || filepath.includes('.git')) {
|
||||
return null;
|
||||
}
|
||||
if (typeof value === 'string') {
|
||||
const auth = checkAuth(value, baseURL);
|
||||
const type = auth ? 'sync' : 'none';
|
||||
@@ -123,11 +126,14 @@ export class SyncBase {
|
||||
type: value?.type ?? type,
|
||||
auth: checkAuth(value.url, baseURL),
|
||||
};
|
||||
});
|
||||
}).filter((item) => item);
|
||||
let resultSyncList: SyncList[] = []
|
||||
if (opts?.getFile) {
|
||||
return this.getSyncListFile(syncList);
|
||||
resultSyncList = await this.getSyncListFile(syncList);
|
||||
} else {
|
||||
resultSyncList = syncList;
|
||||
}
|
||||
return syncList;
|
||||
return resultSyncList;
|
||||
}
|
||||
async getCheckList() {
|
||||
const checkDir = this.config?.clone || {};
|
||||
|
||||
Reference in New Issue
Block a user