From ffefa8a1416d2487b0b460b9b2272c3fb6f15159 Mon Sep 17 00:00:00 2001 From: Tyagiquamar Date: Tue, 25 Aug 2026 17:01:01 +0530 Subject: [PATCH] fix(capture-import): emit forward-slash artifact references in workload cards --- src/capture-import.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/capture-import.ts b/src/capture-import.ts index cc82dd52..b0f6706e 100644 --- a/src/capture-import.ts +++ b/src/capture-import.ts @@ -1,6 +1,6 @@ import { createHash } from "node:crypto"; import { chmodSync, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, statSync, writeFileSync } from "node:fs"; -import { basename, dirname, extname, join, relative, resolve } from "node:path"; +import { basename, dirname, extname, join, relative, resolve, sep } from "node:path"; import { globalConfigDir } from "./config/paths.js"; import { readXlsxRecords } from "./capture-import-xlsx.js"; @@ -1418,8 +1418,8 @@ function ratio(numerator: number, denominator: number): number { } function artifactReference(repo: string, path: string): string { - const repoRelative = relative(repo, path); - if (repoRelative === ".." || repoRelative.startsWith("../") || repoRelative.startsWith("..\\")) { + const repoRelative = relative(repo, path).split(sep).join("/"); + if (repoRelative === ".." || repoRelative.startsWith("../")) { return path; } return repoRelative;