Skip to content

Commit e13a1a0

Browse files
authored
Merge pull request #11 from beda-software/subst-env-watch
feat: Substitute env vars in watch mode
2 parents 2a142a4 + 72cfbec commit e13a1a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fhirsnake/watch.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from converter import convert_questionnaire_fce_to_fhir
77
from files import load_resource
88
from initial_resources import RESOURCE_DIR
9-
from utils import replace_urn_uuid_with_reference
9+
from utils import replace_urn_uuid_with_reference, substitute_env_vars
1010
from watchdog.events import FileSystemEventHandler
1111
from watchdog.observers import Observer
1212

@@ -71,6 +71,11 @@ def process_file(self, file_path):
7171
except Exception as exc:
7272
logging.exception("Failed to convert uris to references: %s", exc)
7373

74+
try:
75+
resource = substitute_env_vars(resource)
76+
except Exception as exc:
77+
logging.exception("Failed to substitute env vars")
78+
7479
try:
7580
response = requests.put(
7681
url,

0 commit comments

Comments
 (0)