فهرست منبع

Fix: replace primitive values in config without quotes (#612).

Merge pull request #62 from diivi/fix/config-json-replacement
Dan Helfman 2 سال پیش
والد
کامیت
4d01e53414
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      borgmatic/config/load.py

+ 1 - 1
borgmatic/config/load.py

@@ -106,7 +106,7 @@ def load_configuration(filename):
         if config and 'constants' in config:
         if config and 'constants' in config:
             for key, value in config['constants'].items():
             for key, value in config['constants'].items():
                 value = json.dumps(value)
                 value = json.dumps(value)
-                file_contents = file_contents.replace(f'{{{key}}}', value)
+                file_contents = file_contents.replace(f'{{{key}}}', value.strip('"'))
             config = yaml.load(file_contents)
             config = yaml.load(file_contents)
             del config['constants']
             del config['constants']
         return config
         return config