From ceb97fd0ee18f2a31354819bcaf190f23a9b0efa Mon Sep 17 00:00:00 2001
From: Darko Poljak <foss@ungleich.com>
Date: Sat, 19 Aug 2017 19:12:30 +0200
Subject: [PATCH] Fix for mistake in 982bb286f49e8941934654f7487ae9d24d467771.

---
 cdist/argparse.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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)