gitea push

This commit is contained in:
2026-05-09 12:19:29 -06:00
parent 06113c95b8
commit 429461e985
1481 changed files with 74306 additions and 52475 deletions
+12 -8
View File
@@ -31,18 +31,22 @@ module.exports = class FileExistsPlugin {
const file = request.path;
if (!file) return callback();
fs.stat(file, (err, stat) => {
if (err || !stat) {
// Combine the two miss branches: a stat failure and a
// "not a file" result share the same handling — record the
// path on `missingDependencies`, log the right reason, then
// bail. The error-message ternary picks the wording that
// matched the failing condition.
if (err || !stat || !stat.isFile()) {
if (resolveContext.missingDependencies) {
resolveContext.missingDependencies.add(file);
}
if (resolveContext.log) resolveContext.log(`${file} doesn't exist`);
return callback();
}
if (!stat.isFile()) {
if (resolveContext.missingDependencies) {
resolveContext.missingDependencies.add(file);
if (resolveContext.log) {
resolveContext.log(
err || !stat
? `${file} doesn't exist`
: `${file} is not a file`,
);
}
if (resolveContext.log) resolveContext.log(`${file} is not a file`);
return callback();
}
if (resolveContext.fileDependencies) {