|
1 |
| -import * as path from "path"; |
2 | 1 | import * as YAML from "yaml";
|
3 | 2 | import { ZodError } from "zod";
|
4 |
| -import { getLastNUriRelativePathParts } from "../../../../core/util/uri.js"; |
5 | 3 | import { PlatformClient, Registry } from "../interfaces/index.js";
|
6 | 4 | import { encodeSecretLocation } from "../interfaces/SecretResult.js";
|
7 | 5 | import {
|
@@ -371,7 +369,7 @@ export async function unrollBlocks(
|
371 | 369 | typeof unrolledBlock.uses !== "string" &&
|
372 | 370 | "filePath" in unrolledBlock.uses
|
373 | 371 | ) {
|
374 |
| - msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], unrolledBlock.uses.filePath, 2)}`; |
| 372 | + msg = `${(err as Error).message}.\n> ${unrolledBlock.uses.filePath}`; |
375 | 373 | } else {
|
376 | 374 | msg = `${(err as Error).message}.\n> ${JSON.stringify(unrolledBlock.uses)}`;
|
377 | 375 | }
|
@@ -453,7 +451,7 @@ export async function unrollBlocks(
|
453 | 451 | } catch (err) {
|
454 | 452 | let msg = "";
|
455 | 453 | if (injectBlock.uriType === "file") {
|
456 |
| - msg = `${(err as Error).message}.\n> ${getLastNUriRelativePathParts([], injectBlock.filePath, 2)}`; |
| 454 | + msg = `${(err as Error).message}.\n> ${injectBlock.filePath}`; |
457 | 455 | } else {
|
458 | 456 | msg = `${(err as Error).message}.\n> ${injectBlock.fullSlug}`;
|
459 | 457 | }
|
@@ -545,10 +543,3 @@ function formatZodError(error: any): string {
|
545 | 543 | }
|
546 | 544 | return error.message || "Validation failed";
|
547 | 545 | }
|
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