fix(clawsweeper): address review for automerge-openclaw-openclaw-80731 (validation-1)

This commit is contained in:
clawsweeper
2026-05-24 14:41:20 +00:00
parent 9d4ccad231
commit 1cf53d95f4
@@ -191,9 +191,8 @@ export function collectPluginNpmPublishedRuntimeErrors(params) {
export function resolveNpmPackFilename(output) {
const filename = output
.split(/\r?\n/u)
.map((line) => line.trim())
.filter(Boolean)
.at(-1);
.findLast((line) => line.trim().length > 0)
?.trim();
if (typeof filename !== "string" || !filename.endsWith(".tgz")) {
throw new Error(`npm pack did not report a tarball filename`);
}