From 7d4080119771dc7f72b520fc0edb0cabe54ede93 Mon Sep 17 00:00:00 2001 From: ZayanKhan-12 <108294002+ZayanKhan-12@users.noreply.github.com> Date: Wed, 22 Jul 2026 11:12:07 -0400 Subject: [PATCH] fix(cli): warn when postinstall auto-update sync fails The postinstall auto-update discarded the sync delegate's exit code with a ternary that returned 0 on both branches, so a failed sync was silently ignored. Thrown errors in the same path already emit a warning; non-zero exit codes now do too. Postinstall still exits 0 so a failed auto-update never breaks npm install. Co-Authored-By: Claude Fable 5 --- bin/metamask-skills.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/metamask-skills.mjs b/bin/metamask-skills.mjs index 1db07b61..a65cba38 100755 --- a/bin/metamask-skills.mjs +++ b/bin/metamask-skills.mjs @@ -751,7 +751,10 @@ function postinstall(args) { } const repo = resolveRepo(target, repoOverride); const result = delegate('sync', target, repo, passthrough); - return result === 0 ? 0 : 0; + if (result !== 0) { + warn(`auto-update failed with exit code ${result}`); + } + return 0; } catch (error) { warn(`auto-update failed: ${error instanceof Error ? error.message : String(error)}`); return 0;