mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Fix regression in version printing.
This regression was caused by commit
ea1f7ef663
, which didn't add "\n" to the
version printing statement. We use std::endl now for compatibility
across platforms.
This commit is contained in:
parent
1a552dfd60
commit
3b89546fd0
@ -867,7 +867,7 @@ public:
|
|||||||
if ((add_args & default_arguments::version) == default_arguments::version) {
|
if ((add_args & default_arguments::version) == default_arguments::version) {
|
||||||
add_argument("-v", "--version")
|
add_argument("-v", "--version")
|
||||||
.action([&](const auto &unused) {
|
.action([&](const auto &unused) {
|
||||||
std::cout << m_version;
|
std::cout << m_version << std::endl;
|
||||||
std::exit(0);
|
std::exit(0);
|
||||||
})
|
})
|
||||||
.default_value(false)
|
.default_value(false)
|
||||||
|
Loading…
Reference in New Issue
Block a user