1
0
Fork 0
mirror of synced 2026-06-05 17:18:19 +00:00
sonarcloud-github-action/cleanup.sh
Piotr Idzik f4a7a62a43
NO-JIRA Prevent globbing and word splitting (#84)
* Prevent globbing and word splitting

* Revert changes in `entrypoint.sh`
2024-07-12 10:29:30 +02:00

14 lines
330 B
Bash

#!/bin/bash
set -e
if [ ! -d "${INPUT_PROJECTBASEDIR}/.scannerwork" ]; then
echo ".scannerwork directory not found; nothing to clean up."
exit
fi
_tmp_file=$(ls "${INPUT_PROJECTBASEDIR}/" | head -1)
PERM=$(stat -c "%u:%g" "${INPUT_PROJECTBASEDIR}/$_tmp_file")
chown -R "$PERM" "${INPUT_PROJECTBASEDIR}/.scannerwork/"