Skip to content

Commit d0106b4

Browse files
missing fs
1 parent cee33c8 commit d0106b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

danger/dangerfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,15 @@ async function checkFromExternalChecks() {
196196
const workspaceDir = '/github/workspace';
197197

198198
const path = require('path');
199+
const fs = require('fs');
199200
const customPath = path.join(workspaceDir, extraDangerFilePath);
200201
// Ensure the resolved path is within workspace
201202
const resolvedPath = fs.realpathSync(customPath);
202203
if (!resolvedPath.startsWith(workspaceDir)) {
203204
fail(`Invalid dangerfile path: ${extraDangerFilePath}. Must be within workspace.`);
204205
return;
205206
}
206-
207+
207208
const extraModule = require(customPath);
208209
if (typeof extraModule !== 'function') {
209210
warn(`EXTRA_DANGERFILE must export a function at ${customPath}`);

0 commit comments

Comments
 (0)