Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/parser-includes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,18 @@
break;
} else {
const localFileName = `${cwd}/${stateDir}/includes/${gitData.remote.host}/${projectPath}/${ref}/${f}`;
// Check remotely only if the file does not exist locally
if (!fs.existsSync(localFileName) && !(await Utils.remoteFileExist(cwd, f, ref, domain, projectPath, gitData.remote.schema, gitData.remote.port))) {
const fileExists = fs.existsSync(localFileName);
// If the file already has been downloaded, skip it
if (fileExists) {
continue;
}

// Check remotely only if the file does not exist locally
const remoteFileExists = await Utils.remoteFileExist(cwd, f, ref, domain, projectPath, gitData.remote.schema, gitData.remote.port);
if (!remoteFileExists) {

Check failure on line 169 in src/parser-includes.ts

View workflow job for this annotation

GitHub Actions / eslint

Trailing spaces not allowed
continue

Check failure on line 170 in src/parser-includes.ts

View workflow job for this annotation

GitHub Actions / eslint

Missing semicolon
}

const fileDoc = {
include: {
project: projectPath,
Expand Down
Loading