From ec53abf169998af3fedfa93caa6726b088c4af07 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 24 Mar 2026 22:04:48 -0700 Subject: [PATCH] fix(e-patches): handle blank output with --commit-updates --- src/e-patches.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/e-patches.js b/src/e-patches.js index 9ce9150b..e92c7c11 100644 --- a/src/e-patches.js +++ b/src/e-patches.js @@ -100,15 +100,19 @@ program encoding: 'utf8', }; - const changedFiles = spawnSync( + const changedFilesOutput = spawnSync( config, 'git', ['diff', '--name-only', '--diff-filter=d'], spawnOpts, 'Failed to get list of changed files', - ); + ).stdout.trim(); + + if (changedFilesOutput.length === 0) { + return; + } - for (const filename of changedFiles.stdout.trim().split('\n')) { + for (const filename of changedFilesOutput.split('\n')) { if (!filename.startsWith('patches/')) { console.error(`${color.err} Unexpectedly found non-patch file change: ${filename}`); return;