From 22e98ff928b58c6d7d648ec8b553ce5b7d9ea2bf Mon Sep 17 00:00:00 2001 From: David Berlin Date: Sun, 27 Oct 2024 15:41:46 +0200 Subject: [PATCH 1/2] chore: keep logging pipe for trusted plugins --- packages/build/src/steps/plugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/build/src/steps/plugin.js b/packages/build/src/steps/plugin.js index 58053fbf23..8dd933ed27 100644 --- a/packages/build/src/steps/plugin.js +++ b/packages/build/src/steps/plugin.js @@ -108,7 +108,9 @@ export const firePluginStep = async function ({ }) return { newError } } finally { - await unpipePluginOutput(childProcess, logs, listeners, standardStreams) + if (!isTrustedPlugin(pluginPackageJson?.name)) { + await unpipePluginOutput(childProcess, logs, listeners, standardStreams) + } logStepCompleted(logs, verbose) } } From 1d0eebf77f4431cb9a91c6fdb29ad222036dbf88 Mon Sep 17 00:00:00 2001 From: David Berlin Date: Tue, 29 Oct 2024 09:13:24 +0200 Subject: [PATCH 2/2] fix: unpipe when buffering logs --- packages/build/src/steps/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/build/src/steps/plugin.js b/packages/build/src/steps/plugin.js index 8dd933ed27..c4ef936492 100644 --- a/packages/build/src/steps/plugin.js +++ b/packages/build/src/steps/plugin.js @@ -108,7 +108,7 @@ export const firePluginStep = async function ({ }) return { newError } } finally { - if (!isTrustedPlugin(pluginPackageJson?.name)) { + if (!isTrustedPlugin(pluginPackageJson?.name) || listeners) { await unpipePluginOutput(childProcess, logs, listeners, standardStreams) } logStepCompleted(logs, verbose)