Skip to content

Commit

Permalink
CmdReport: Throw error if report fails to produce output
Browse files Browse the repository at this point in the history
Ideally this would be fixed in libshared.

See GothenburgBitFactory/libshared#27

Signed-off-by: Shaun Ruffell <[email protected]>
  • Loading branch information
sruffell committed Aug 14, 2020
1 parent 5591dc2 commit eff3c36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commands/CmdReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ int CmdReport (

// Run the extensions.
std::vector <std::string> output;
extensions.callExtension (script, split (input, '\n'), output);
int rc = extensions.callExtension (script, split (input, '\n'), output);
if (rc != 0 && output.size () == 0)
{
throw format ("'{1}' returned {2} without producing output.", script, rc);
}

// Display the output.
for (auto& line : output)
Expand Down

0 comments on commit eff3c36

Please sign in to comment.