Skip to content

Commit d8ced8b

Browse files
authored
chore: handle both new and old yarn install logs for backwards compatibility (#119)
Signed-off-by: rhdh-bot service account <rhdh-bot@redhat.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent 4f020a7 commit d8ced8b

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

export-dynamic/export-dynamic.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ run_cli() {
5757
echo "##########################################################"
5858
cat /tmp/export-dynamic-cli.log
5959
echo "##########################################################"
60-
if [[ -f yarn-install.log ]]; then
61-
cat yarn-install.log;
62-
echo "##########################################################"
63-
fi
60+
61+
# Search for both types of log files for backwards compatibility
62+
local yarn_install_logs=("yarn-install.log" "rhdh-cli.yarn-install.log")
63+
for log_file in "${yarn_install_logs[@]}"; do
64+
if [[ -f "$log_file" ]]; then
65+
cat "$log_file"
66+
echo "##########################################################"
67+
fi
68+
done
6469
return 1
6570
fi
6671
rm -f /tmp/export-dynamic-cli.log

0 commit comments

Comments
 (0)