From 35b5a08132336b6349d64dc0de5a810f718e29a3 Mon Sep 17 00:00:00 2001 From: Quake <74355598+QuakeEye@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:25:44 +0100 Subject: [PATCH] fix: add check before performing chmod on the code coverage path (#262) * fix: add check before performing chmod on the code coverage path, as it does not exist if the package is not installed * fix: generalise the dir not existing message more * fix: improve guide message --------- Co-authored-by: Quake --- dist/platforms/ubuntu/run_tests.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dist/platforms/ubuntu/run_tests.sh b/dist/platforms/ubuntu/run_tests.sh index 621966aa..e80e13cc 100755 --- a/dist/platforms/ubuntu/run_tests.sh +++ b/dist/platforms/ubuntu/run_tests.sh @@ -274,4 +274,10 @@ fi # Add read permissions for everyone to all artifacts chmod -R a+r "$UNITY_PROJECT_PATH" chmod -R a+r "$FULL_ARTIFACTS_PATH" -chmod -R a+r "$FULL_COVERAGE_RESULTS_PATH" + +# Check if coverage results directory exists +if [ -d "$FULL_COVERAGE_RESULTS_PATH" ]; then + chmod -R a+r "$FULL_COVERAGE_RESULTS_PATH" +else + echo "Coverage results directory does not exist. If you are expecting coverage results, please make sure the Code Coverage package is installed in your unity project and that it is set up correctly." +fi \ No newline at end of file