]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph_argparse: put args from env before existing ones 33243/head
authorKefu Chai <kchai@redhat.com>
Wed, 12 Feb 2020 12:47:12 +0000 (20:47 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 12 Feb 2020 14:18:30 +0000 (22:18 +0800)
commit36b81324ae450ea065865ef75cf789ef0d36d9cf
tree34dcb158e530f6730a400230478ae6a78486ee15
parentbe7fedf8748970fc81dbca00ff43c79746d993af
ceph_argparse: put args from env before existing ones

to ensure environment variables can be overriden by command line
arguments.

For example, if you have "CEPH_ARGS='--id XYZ'", passing "--id ABC" to
a Ceph CLI tool should result in the ABC id being utilized.

Fixes: https://tracker.ceph.com/issues/43795
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/ceph_argparse.cc
src/test/ceph_argparse.cc