Skip to content

Commit 8518425

Browse files
fix: if requested, properly encode Path types as base64 (#84)
1 parent b1aff28 commit 8518425

File tree

1 file changed

+4
-1
lines changed
  • snakemake_interface_executor_plugins

1 file changed

+4
-1
lines changed

snakemake_interface_executor_plugins/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ def maybe_encode(value):
6363
if isinstance(value, SettingsEnumBase):
6464
return value.item_to_choice()
6565
elif isinstance(value, Path):
66-
return shlex.quote(str(value))
66+
if base64_encode:
67+
return encode_as_base64(str(value))
68+
else:
69+
return shlex.quote(str(value))
6770
elif isinstance(value, str):
6871
if is_quoted(value) and not base64_encode:
6972
# the value is already quoted, do not quote again

0 commit comments

Comments
 (0)