Skip to content

Commit a06285d

Browse files
fix reference
1 parent 18f9f59 commit a06285d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

danger/dangerfile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,13 @@ async function CheckFromExternalChecks() {
193193
console.log(`::debug:: Checking from external checks: ${extraDangerFilePath}`);
194194
if (extraDangerFilePath) {
195195
try {
196+
const workspaceDir = '/github/workspace';
197+
const customPath = `${workspaceDir}${extraDangerFilePath}`;
198+
196199
if (extraDangerFilePath.contains(workspaceDir)) {
197200
fail(`Invalid dangerfile path: ${customPath}. Path traversal is not allowed.`);
198201
return;
199-
}
200-
201-
const workspaceDir = '/github/workspace';
202-
const customPath = `${workspaceDir}${extraDangerFilePath}`;
202+
}
203203

204204
const extraModule = require(customPath);
205205
if (typeof extraModule !== 'function') {

0 commit comments

Comments
 (0)