From e4b544bd3957655164bf8ea5e5536743ed97b7d3 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Tue, 14 Jun 2016 09:53:32 +0100 Subject: [PATCH] Create PID_FOLDER if it doesn't exist In fact the folder was already created if the app is running as a different user, but not if running as the current user, so it was just a question of moving one line out of an if block. Fixes gh-5986 --- .../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 fd4465f136..8e2ce5d74c 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 @@ -140,8 +140,8 @@ start() { do_start() { working_dir=$(dirname "$jarfile") pushd "$working_dir" > /dev/null + mkdir "$PID_FOLDER" &> /dev/null if [[ -n "$run_user" ]]; then - mkdir "$PID_FOLDER" &> /dev/null checkPermissions || return $? chown "$run_user" "$PID_FOLDER" chown "$run_user" "$pid_file"