Skip to content

Commit

Permalink
Only use last line as fileName when packing (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjellek authored Nov 28, 2024
1 parent 82d6230 commit b3cd98d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/utils/pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export async function pack(srcDir: string, dstDir: string) {
);
});

const fileName = path.basename(stdout.trim());
const lastLine = stdout.trim().split("\n").at(-1);
if (!lastLine) {
throw new Error(`Failed to parse last line from stdout: ${stdout.trim()}`);
}
const fileName = path.basename(lastLine);

const filePath = path.join(dstDir, fileName);

Expand Down

0 comments on commit b3cd98d

Please sign in to comment.