From 980d4dae112a6e7787f82c75eafb4ecf7a63df19 Mon Sep 17 00:00:00 2001 From: Drulikar Date: Tue, 7 Jan 2025 05:49:22 -0600 Subject: [PATCH] Even more stderror manipulation! --- tools/github-actions/nanomap-renderer-invoker.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/github-actions/nanomap-renderer-invoker.sh b/tools/github-actions/nanomap-renderer-invoker.sh index 22a89e83d4..791676d2a8 100755 --- a/tools/github-actions/nanomap-renderer-invoker.sh +++ b/tools/github-actions/nanomap-renderer-invoker.sh @@ -35,8 +35,8 @@ for map in ${map_files[@]}; do done printf "\n\n\n" -#Duplicate stdout because dmm-tools doesn't return an error code for bad icons or bad path so we need to capture it -exec 5>&1 +#Duplicate stderr because dmm-tools doesn't return an error code for bad icons or bad path so we need to capture it +exec 5>&2 #Now render per group to initial images any_errors=0 @@ -60,7 +60,7 @@ for mapdir in ${mapdirs[@]}; do fi #Render maps to initial images ignoring some tg specific icon_state handling - result=$(~/dmm-tools minimap "${map_files[@]}" --disable smart-cables,overlays,pretty | tee /dev/fd/5) + result=$(~/dmm-tools minimap "${map_files[@]}" --disable smart-cables,overlays,pretty 2>&1 | tee /dev/fd/5) #Check if anything errored if [[ ($? -ne 0) || ("${result}" =~ ("bad icon"|"bad path")) ]]; then @@ -72,9 +72,13 @@ for mapdir in ${mapdirs[@]}; do if [[ "${cur_define}" != "" ]]; then sed -i '$ d' ${dme} fi + printf "\n" done +#Close the new file descriptor +exec 5>&- + #Give results if we're just testing if [[ $1 == "--testing" ]]; then if [[ any_errors -ne 0 ]]; then