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
+11 -11
View File
@@ -33,21 +33,21 @@ module.exports = class DirectoryExistsPlugin {
const directory = request.path;
if (!directory) return callback();
fs.stat(directory, (err, stat) => {
if (err || !stat) {
// Combine the two miss branches: a stat failure and a
// "not a directory" 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.isDirectory()) {
if (resolveContext.missingDependencies) {
resolveContext.missingDependencies.add(directory);
}
if (resolveContext.log) {
resolveContext.log(`${directory} doesn't exist`);
}
return callback();
}
if (!stat.isDirectory()) {
if (resolveContext.missingDependencies) {
resolveContext.missingDependencies.add(directory);
}
if (resolveContext.log) {
resolveContext.log(`${directory} is not a directory`);
resolveContext.log(
err || !stat
? `${directory} doesn't exist`
: `${directory} is not a directory`,
);
}
return callback();
}