From e871252ddd9d0cd4e6bcfeee7985b31aa56a1976 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 6 Jun 2025 15:20:06 -0700 Subject: [PATCH] use existing util function to resolve URIs --- packages/config-yaml/src/load/unroll.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index 7c112a108..8e9507b79 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -1,6 +1,7 @@ import * as path from "path"; import * as YAML from "yaml"; import { ZodError } from "zod"; +import { getLastNUriRelativePathParts } from "../../../../core/util/uri.js"; import { PlatformClient, Registry } from "../interfaces/index.js"; import { encodeSecretLocation } from "../interfaces/SecretResult.js"; import { @@ -370,7 +371,7 @@ export async function unrollBlocks( typeof unrolledBlock.uses !== "string" && "filePath" in unrolledBlock.uses ) { - msg = `${(err as Error).message}.\n> ${shortenedPath(unrolledBlock.uses.filePath)}`; + msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], unrolledBlock.uses.filePath, 2)}`; } else { msg = `${(err as Error).message}.\n> ${JSON.stringify(unrolledBlock.uses)}`; } @@ -452,7 +453,7 @@ export async function unrollBlocks( } catch (err) { let msg = ""; if (injectBlock.uriType === "file") { - msg = `${(err as Error).message}.\n> ${shortenedPath(injectBlock.filePath)}`; + msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], injectBlock.filePath, 2)}`; } else { msg = `${(err as Error).message}.\n> ${injectBlock.fullSlug}`; }