Skip to content

Commit 3daaa12

Browse files
committed
subprocesses.adb: Do not set the exit status when ignoring subcommand failure
Change the verbose reporting mechanism for Run_Command when ignoring subprocess failures to not set the exit status of gnatcov to Failure, as it otherwise defeats the point of ignoring the failures.
1 parent 348b95a commit 3daaa12

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/gnatcov/subprocesses.adb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ package body Subprocesses is
106106
if Success then
107107
Put_Line (Command & " finished");
108108
else
109-
Error (Origin_Command_Name & " failed");
109+
-- Do not use Error as this sets the exit status to Failure, but
110+
-- here we are precisely ignoring the fact that the subprocess
111+
-- failed.
112+
113+
Warning_Or_Error (Origin_Command_Name & " failed");
110114
end if;
111115
end if;
112116
end Check_Status;

0 commit comments

Comments
 (0)