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 <QuakeEye@users.noreply.GitHub.com>
pull/267/head
Quake 2024-03-15 01:25:44 +01:00 committed by GitHub
parent 317261b223
commit 35b5a08132
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -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