From 5b61cf1f63ac27bd309c2cda5da498140e6f2393 Mon Sep 17 00:00:00 2001 From: Dotta Date: Wed, 22 Jul 2026 19:39:39 +0000 Subject: [PATCH] test(installer): make fixture logging atomic Co-Authored-By: Paperclip --- scripts/install-sh-fixtures/npx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/install-sh-fixtures/npx b/scripts/install-sh-fixtures/npx index 9ff863ff8ac..0d59c772927 100755 --- a/scripts/install-sh-fixtures/npx +++ b/scripts/install-sh-fixtures/npx @@ -3,11 +3,13 @@ set -euo pipefail : "${PAPERCLIP_INSTALL_TEST_LOG:?PAPERCLIP_INSTALL_TEST_LOG is required}" node --version >"${PAPERCLIP_INSTALL_TEST_LOG}.node" -printf 'NPM_CONFIG_REGISTRY=%s\n' "${NPM_CONFIG_REGISTRY:-}" >>"$PAPERCLIP_INSTALL_TEST_LOG" -printf 'npm_config_registry=%s\n' "${npm_config_registry:-}" >>"$PAPERCLIP_INSTALL_TEST_LOG" -printf 'NPM_CONFIG_USERCONFIG=%s\n' "${NPM_CONFIG_USERCONFIG:-}" >>"$PAPERCLIP_INSTALL_TEST_LOG" -printf 'npm_config_userconfig=%s\n' "${npm_config_userconfig:-}" >>"$PAPERCLIP_INSTALL_TEST_LOG" -if [ -n "${NPM_CONFIG_USERCONFIG:-}" ] && [ -f "$NPM_CONFIG_USERCONFIG" ]; then - sed 's/^/npmrc:/' "$NPM_CONFIG_USERCONFIG" >>"$PAPERCLIP_INSTALL_TEST_LOG" -fi -printf '%s\n' "$@" >>"$PAPERCLIP_INSTALL_TEST_LOG" +{ + printf 'NPM_CONFIG_REGISTRY=%s\n' "${NPM_CONFIG_REGISTRY:-}" + printf 'npm_config_registry=%s\n' "${npm_config_registry:-}" + printf 'NPM_CONFIG_USERCONFIG=%s\n' "${NPM_CONFIG_USERCONFIG:-}" + printf 'npm_config_userconfig=%s\n' "${npm_config_userconfig:-}" + if [ -n "${NPM_CONFIG_USERCONFIG:-}" ] && [ -f "$NPM_CONFIG_USERCONFIG" ]; then + sed 's/^/npmrc:/' "$NPM_CONFIG_USERCONFIG" + fi + printf '%s\n' "$@" +} >>"$PAPERCLIP_INSTALL_TEST_LOG"