Skip to content
Browse files

check exit code when running plackup

  • Loading branch information...
1 parent 2b34f3e commit 5b76a66983a02dd58b3a5364246e6a79bf0012da @knutov committed
Showing with 4 additions and 5 deletions.
  1. +4 −5 dancerctl
View
9 dancerctl
@@ -220,11 +220,10 @@ sub start {
my $cmd = join(" ", @cmd); say $cmd if $debug;
- system($cmd);
- #TODO: check status code
- say "Application '$app' started in '$env' mode." if $daemon;
- say "Browse at http://$listen" if $method eq 'port' and $daemon;
- say "Listen on $listen" if $method eq 'socket' and $daemon;
+ my $ok = system($cmd) == 0;
+ say "Application '$app' started in '$env' mode." if $daemon and $ok;
+ say "Browse at http://$listen" if $method eq 'port' and $daemon and $ok;
+ say "Listen on $listen" if $method eq 'socket' and $daemon and $ok;
}
#===============================================================================
sub parse_user_config {

0 comments on commit 5b76a66

Please sign in to comment.
Something went wrong with that request. Please try again.