diff --git a/cdist/argparse.py b/cdist/argparse.py index 9afc5a82..849b19d2 100644 --- a/cdist/argparse.py +++ b/cdist/argparse.py @@ -115,7 +115,7 @@ def get_parsers(): '-b', '--beta', help=('Enable beta functionality. '), action='store_true', dest='beta', - default=False) + default='CDIST_BETA' in os.environ) # Main subcommand parser parser['main'] = argparse.ArgumentParser( @@ -149,7 +149,7 @@ def get_parsers(): help=('Specify custom cache path pattern. If ' 'it is not set then default hostdir is used.'), dest='cache_path_pattern', - default=None) + default=os.environ.get('CDIST_CACHE_PATH_PATTERN')) parser['config_main'].add_argument( '-c', '--conf-dir', help=('Add configuration directory (can be repeated, ' @@ -195,13 +195,13 @@ def get_parsers(): '--remote-copy', help='Command to use for remote copy (should behave like scp).', action='store', dest='remote_copy', - default=None) + default=os.environ.get('CDIST_REMOTE_COPY')) parser['config_main'].add_argument( '--remote-exec', help=('Command to use for remote execution ' '(should behave like ssh).'), action='store', dest='remote_exec', - default=None) + default=os.environ.get('CDIST_REMOTE_EXEC')) # Config parser['config_args'] = argparse.ArgumentParser(add_help=False)