handle no slashes case

This commit is contained in:
Jason Fu
2025-07-09 02:37:03 +02:00
parent 9d5050d3ee
commit 17be8f3601

View File

@@ -139,7 +139,7 @@ export function convert(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
options?: unknown,
): Promise<string> {
const outputPath = targetPath.split("/").slice(0, -1).join("/").replace("./", "");
const outputPath = targetPath.split("/").slice(0, -1).join("/").replace("./", "") ?? targetPath;
// Build arguments array
const args: string[] = [];