mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 20:42:38 +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};
|
$mod->postprocess if not $mod->{error};
|
||||||
|
|
||||||
if (not length $mod->{output}) {
|
if (exists $mod->{no_output} or not length $mod->{output}) {
|
||||||
$mod->{output} = "Success (no output).\n" if not $mod->{error};
|
$mod->{output} .= "\n" if length $mod->{output};
|
||||||
$mod->{output} = "Success (exit code $mod->{error}).\n" if $mod->{error};
|
$mod->{output} .= "Success (no output).\n" if not $mod->{error};
|
||||||
|
$mod->{output} .= "Success (exit code $mod->{error}).\n" if $mod->{error};
|
||||||
}
|
}
|
||||||
|
|
||||||
return $mod->{output};
|
return $mod->{output};
|
||||||
|
Loading…
Reference in New Issue
Block a user