mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2026-04-13 00:40:06 +00:00
SQSCANGHA-75 Support self-hosted runners not clearing temp after run (#164)
This commit is contained in:
parent
ea0362bf7b
commit
0ab314b63d
2 changed files with 45 additions and 2 deletions
|
|
@ -48,5 +48,13 @@ fi
|
|||
|
||||
unzip -q -o $SCANNER_FILE_NAME
|
||||
|
||||
SCANNER_UNZIP_FOLDER="sonar-scanner-$INPUT_SCANNERVERSION-$FLAVOR"
|
||||
# Folder name should correspond to the directory cached by the actions/cache
|
||||
mv sonar-scanner-$INPUT_SCANNERVERSION-$FLAVOR $RUNNER_TEMP/sonar-scanner-cli-$INPUT_SCANNERVERSION-$RUNNER_OS-$RUNNER_ARCH
|
||||
SCANNER_LOCAL_FOLDER="$RUNNER_TEMP/sonar-scanner-cli-$INPUT_SCANNERVERSION-$RUNNER_OS-$RUNNER_ARCH"
|
||||
|
||||
if [ -d "$SCANNER_LOCAL_FOLDER" ]; then
|
||||
echo "::warning title=SonarScanner::Cleaning existing scanner folder: $SCANNER_LOCAL_FOLDER"
|
||||
rm -rf "$SCANNER_LOCAL_FOLDER"
|
||||
fi
|
||||
|
||||
mv -f "$SCANNER_UNZIP_FOLDER" "$SCANNER_LOCAL_FOLDER"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue