diff options
author | Jean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com> | 2013-05-20 16:02:35 +0200 |
---|---|---|
committer | Jean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com> | 2013-05-20 16:02:35 +0200 |
commit | 77ae9c7a5d2d4c73647370aea360b5229d675d2f (patch) | |
tree | 7d06672c62cbf9dac5c19c2f36b3d717136a83cb | |
parent | 9bf2e62f70a66a1612db88415bf6371bd59163b7 (diff) | |
download | sonar-scanner-cli-77ae9c7a5d2d4c73647370aea360b5229d675d2f.tar.gz sonar-scanner-cli-77ae9c7a5d2d4c73647370aea360b5229d675d2f.zip |
SONARPLUGINS-2862 Only resolve symlink target file when the executed file is an actual symlink
-rwxr-xr-x | sonar-runner-dist/src/main/assembly/bin/sonar-runner | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-runner-dist/src/main/assembly/bin/sonar-runner b/sonar-runner-dist/src/main/assembly/bin/sonar-runner index 1658fcb..1140738 100755 --- a/sonar-runner-dist/src/main/assembly/bin/sonar-runner +++ b/sonar-runner-dist/src/main/assembly/bin/sonar-runner @@ -68,8 +68,10 @@ real_path () { if [ -z "$SONAR_RUNNER_HOME" ] ; then PRG="$0" - # resolve symlinks - PRG=`real_path "$PRG"` + if [ -h "$PRG" ] ; then + # resolve symlinks + PRG=`real_path "$PRG"` + fi SONAR_RUNNER_HOME=`dirname "$PRG"`/.. |