Bugfix: Only write the development server PID file if it starts successfully

This commit is contained in:
Starbeamrainbowlabs 2019-07-22 15:24:15 +01:00
parent 63bc4e536d
commit aee55acb37
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

2
build
View file

@ -197,7 +197,7 @@ task_dev-server() {
task_begin "Starting development server"; task_begin "Starting development server";
php -S "[::1]:40482" & php -S "[::1]:40482" &
exit_code=$?; exit_code=$?;
echo $! >/tmp/micro-lantern-dev-server.pid; [[ "${exit_code}" -eq "0" ]] && echo $! >/tmp/micro-lantern-dev-server.pid;
task_end $?; # Should be 0 unless php died for some reason task_end $?; # Should be 0 unless php died for some reason
sleep 1; sleep 1;
} }