Skip to content

Commit 899e54a

Browse files
fix: fixed relative file path bug [CSENG-200]
1 parent a7f4561 commit 899e54a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib/snyk-test/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ export async function printDepGraphError(
204204
return new Promise((res, rej) => {
205205
// Normalize the target file path to be relative to root, consistent with printDepGraphJsonl
206206
const normalisedTargetFile = failedProjectScanError.targetFile
207-
? path.relative(root, failedProjectScanError.targetFile)
208-
: failedProjectScanError.targetFile;
207+
? path.relative(root, path.resolve(root, failedProjectScanError.targetFile))
208+
: failedProjectScanError.targetFile;
209209

210210
const problemError = getOrCreateErrorCatalogError(failedProjectScanError);
211211
const serializedError = problemError.toJsonApi().body();

0 commit comments

Comments
 (0)