Skip to content

Commit 4802633

Browse files
committed
fix: flaky masking of benign warning during pnpm install
1 parent 3911be3 commit 4802633

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

plugin/source/dynamix.unraid.net/etc/rc.d/rc.unraid-api

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,8 @@ restore_pnpm_store() {
108108
# Output: Streams install progress and logs build script warnings
109109
run_pnpm_install() {
110110
local log_file="/var/log/unraid-api/build-scripts.log"
111-
stdbuf -oL pnpm install --prod --prefer-offline 2>&1 | while IFS= read -r line; do
112-
if echo "$line" | grep -q "Ignored build scripts:"; then
113-
mkdir -p "$(dirname "$log_file")"
114-
echo "Note: This warning is expected. Build scripts are intentionally ignored for security and performance reasons." > "$log_file"
115-
echo "$line" >> "$log_file"
116-
echo "Build scripts completed. See $log_file for details."
117-
else
118-
echo "$line"
119-
fi
120-
done
111+
stdbuf -oL pnpm install --prod --prefer-offline --reporter=append-only 2>&1 | sed -e "/^╭ Warning/,/^╰/w $log_file" -e "/^╭ Warning/,/^╰/c\Build scripts completed. See $log_file for details."
112+
echo "Note: This warning is expected. Build scripts are intentionally ignored for security and performance reasons." >> "$log_file"
121113
}
122114

123115
# Installs production dependencies for the unraid-api using pnpm. Prefers offline mode.

0 commit comments

Comments
 (0)