Fix content parsing
Build and publish / docker (push) Successful in 2m15s Details

This commit is contained in:
Brieuc Dubois 2024-02-19 18:53:23 +01:00
parent aa6b374075
commit 0baf51ebde
1 changed files with 3 additions and 1 deletions

View File

@ -21,8 +21,10 @@ def get_env(name, default=None, mandatory=False):
if mandatory and content is None:
raise ValueError(f'Missing environment variable {name}')
if type(default) == bool:
if type(default) == str:
return content.lower() in ('true', '1')
if type(default) == bool:
return content
if type(default) == int:
return int(content)
if type(default) == float: