summaryrefslogtreecommitdiff
path: root/cc
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-02-17 13:34:44 +0000
committerDaniel Mueller <deso@posteo.net>2019-02-17 19:50:52 -0800
commitd3fea96b4467cc6fa22c9e7dfe6b6ce6375848b0 (patch)
treeec4c414312685421c2a64f00b2cf721add02ab28 /cc
parent20274ad9381b28d1dd4de5b9e255fed6f88c03ad (diff)
downloadnitrocli-d3fea96b4467cc6fa22c9e7dfe6b6ce6375848b0.tar.gz
nitrocli-d3fea96b4467cc6fa22c9e7dfe6b6ce6375848b0.tar.bz2
Respect ctx.std{out,err} for version output
Due to a bug in argparse [0], custom stdout and stderr settings are ignored when using argparse::Print, as we currently do for the --version option. This patch adds a workaround for this problem: Instead of using argparse::Print, we use argparse::StoreTrue for the --version option. The argument parsing will fail as the command is missing, but the version variable will still be set to true if the version option was set. So we ignore the parsing result and discard the argparse output if the version variable is set. [0] https://github.com/tailhook/rust-argparse/pull/50
Diffstat (limited to 'cc')
0 files changed, 0 insertions, 0 deletions