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
1 changed files with 1 additions and 1 deletions

2
build
View File

@ -197,7 +197,7 @@ task_dev-server() {
task_begin "Starting development server";
php -S "[::1]:40482" &
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
sleep 1;
}