Skip to content

Commit

Permalink
interpret None-env value as empty string
Browse files Browse the repository at this point in the history
This commit interprets a None environment value
as an empty string. It also ensures that all
values are strings instead of, for example,
`int`.
  • Loading branch information
christian-monch committed May 6, 2024
1 parent a7c5c59 commit 652f72c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datalad_next/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def set_gitconfig_items_in_env(items: Mapping[str, str | Tuple[str, ...]]):
values = value if isinstance(value, tuple) else (value,)
for v in values:
environ[f'GIT_CONFIG_KEY_{count}'] = key
environ[f'GIT_CONFIG_VALUE_{count}'] = v
environ[f'GIT_CONFIG_VALUE_{count}'] = '' if v is None else str(v)
count += 1
if count:
environ['GIT_CONFIG_COUNT'] = str(count)
Expand Down

0 comments on commit 652f72c

Please sign in to comment.