Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main.c: Remove unused EXIT_STATUS_EXACT option #2915

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ enum {
RAW_NO_LF = 1024,
UNBUFFERED_OUTPUT = 2048,
EXIT_STATUS = 4096,
EXIT_STATUS_EXACT = 8192,
SEQ = 16384,
RUN_TESTS = 32768,
/* debugging only */
Expand Down Expand Up @@ -231,7 +230,6 @@ static int process(jq_state *jq, jv value, int flags, int dumpopts, int options)
}
if (jq_halted(jq)) {
// jq program invoked `halt` or `halt_error`
options |= EXIT_STATUS_EXACT;
jv exit_code = jq_get_exit_code(jq);
if (!jv_is_valid(exit_code))
ret = JQ_OK;
Expand Down Expand Up @@ -783,7 +781,7 @@ int main(int argc, char* argv[]) {
jq_util_input_free(&input_state);
jq_teardown(&jq);

if (options & (EXIT_STATUS|EXIT_STATUS_EXACT)) {
if (options & EXIT_STATUS) {
if (ret != JQ_OK_NO_OUTPUT)
jq_exit_with_status(ret);
else
Expand Down