Skip to content

Commit 6ca0268

Browse files
committed
rever to printing full file path
1 parent e871252 commit 6ca0268

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

packages/config-yaml/src/load/unroll.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import * as path from "path";
21
import * as YAML from "yaml";
32
import { ZodError } from "zod";
4-
import { getLastNUriRelativePathParts } from "../../../../core/util/uri.js";
53
import { PlatformClient, Registry } from "../interfaces/index.js";
64
import { encodeSecretLocation } from "../interfaces/SecretResult.js";
75
import {
@@ -371,7 +369,7 @@ export async function unrollBlocks(
371369
typeof unrolledBlock.uses !== "string" &&
372370
"filePath" in unrolledBlock.uses
373371
) {
374-
msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], unrolledBlock.uses.filePath, 2)}`;
372+
msg = `${(err as Error).message}.\n> ${unrolledBlock.uses.filePath}`;
375373
} else {
376374
msg = `${(err as Error).message}.\n> ${JSON.stringify(unrolledBlock.uses)}`;
377375
}
@@ -453,7 +451,7 @@ export async function unrollBlocks(
453451
} catch (err) {
454452
let msg = "";
455453
if (injectBlock.uriType === "file") {
456-
msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], injectBlock.filePath, 2)}`;
454+
msg = `${(err as Error).message}.\n> ${injectBlock.filePath}`;
457455
} else {
458456
msg = `${(err as Error).message}.\n> ${injectBlock.fullSlug}`;
459457
}
@@ -545,10 +543,3 @@ function formatZodError(error: any): string {
545543
}
546544
return error.message || "Validation failed";
547545
}
548-
549-
function shortenedPath(filePath: string): string {
550-
const basename = path.posix.basename(filePath);
551-
const parent = path.posix.basename(path.posix.dirname(filePath));
552-
const shortenedPath = `${parent}/${basename}`;
553-
return shortenedPath;
554-
}

0 commit comments

Comments
 (0)