From de56afb43028561d99396acd8cd5cc5581d96cf4 Mon Sep 17 00:00:00 2001 From: Quake Date: Wed, 28 Feb 2024 13:42:19 +0100 Subject: [PATCH] fix: add check before performing chmod on the code coverage path, as it does not exist if the package is not installed --- 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 f72c2ee..2185ac6 100755 --- a/dist/platforms/ubuntu/run_tests.sh +++ b/dist/platforms/ubuntu/run_tests.sh @@ -242,4 +242,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 project." +fi \ No newline at end of file