aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFJob_argv.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-15 21:34:35 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-15 22:13:12 +0100
commitfbd3e56da787d18e7a8794580d0e95b7669d1bc4 (patch)
tree33536b518187508d284771504f09c90c70ae5201 /libqpdf/QPDFJob_argv.cc
parent19608ec151f218aa5f7c47a2d1e497d88acbb3be (diff)
downloadqpdf-fbd3e56da787d18e7a8794580d0e95b7669d1bc4.tar.zst
Ignore -- at the top level arg parser (fixes #652)
This was unintended behavior that was added back for backward compatibility. It is intentionally undocumented.
Diffstat (limited to 'libqpdf/QPDFJob_argv.cc')
-rw-r--r--libqpdf/QPDFJob_argv.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libqpdf/QPDFJob_argv.cc b/libqpdf/QPDFJob_argv.cc
index 6cbbd841..b1e3da1c 100644
--- a/libqpdf/QPDFJob_argv.cc
+++ b/libqpdf/QPDFJob_argv.cc
@@ -67,6 +67,11 @@ ArgParser::initOptionTables()
this->ap.addFinalCheck([this](){c_main->checkConfiguration();});
// add_help is defined in auto_job_help.hh
add_help(this->ap);
+ // Special case: ignore -- at the top level. This undocumented
+ // behavior is for backward compatibility; it was unintentionally
+ // the case prior to 10.6, and some users were relying on it.
+ this->ap.selectMainOptionTable();
+ this->ap.addBare("--", [](){});
}
void