From 6bbd50e084b14e1135303ea0c771eb27733fca9d Mon Sep 17 00:00:00 2001 From: Christian Flamm Date: Tue, 19 Apr 2016 12:38:56 +0200 Subject: [PATCH] Update launch script to canonicalize jarfolder Previously, if the folder which contained the jar was a symlink the launch script would use the symlinked folder's name when determining the default identity. This commit updates the launch script so that symlinks are resolved and the canonical name of the folder which contains the jar is used when determining the script's default identity. The behaviour when APP_NAME has been set is unchanged. Closes gh-5679 Closes gh-5733 --- .../org/springframework/boot/loader/tools/launch.script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script b/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script index efea63e679..da593c06c1 100755 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/resources/org/springframework/boot/loader/tools/launch.script @@ -37,7 +37,7 @@ while [[ -L "$jarfile" ]]; do cd "$(dirname "$jarfile")" || exit 1 jarfile=$(pwd)/$(basename "$jarfile") done -jarfolder="$(dirname "$jarfile")" +jarfolder="$( (cd $(dirname "$jarfile") && pwd -P) )" cd "$WORKING_DIR" || exit 1 # Source any config file