mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-19 10:29:30 +01:00
Correct handling of no-output
This commit is contained in:
parent
16dce2c484
commit
925f2292e0
@ -134,9 +134,10 @@ sub interpret {
|
||||
|
||||
$mod->postprocess if not $mod->{error};
|
||||
|
||||
if (not length $mod->{output}) {
|
||||
$mod->{output} = "Success (no output).\n" if not $mod->{error};
|
||||
$mod->{output} = "Success (exit code $mod->{error}).\n" if $mod->{error};
|
||||
if (exists $mod->{no_output} or not length $mod->{output}) {
|
||||
$mod->{output} .= "\n" if length $mod->{output};
|
||||
$mod->{output} .= "Success (no output).\n" if not $mod->{error};
|
||||
$mod->{output} .= "Success (exit code $mod->{error}).\n" if $mod->{error};
|
||||
}
|
||||
|
||||
return $mod->{output};
|
||||
|
Loading…
Reference in New Issue
Block a user