From 7b294a117c7f6a6fb76b6ce3be37db3d122bab2c Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Wed, 26 Mar 2025 21:00:12 +0100 Subject: [PATCH] fix: if requested, properly encode Path types as base64 --- snakemake_interface_executor_plugins/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/snakemake_interface_executor_plugins/utils.py b/snakemake_interface_executor_plugins/utils.py index 11795f5..4e4649f 100644 --- a/snakemake_interface_executor_plugins/utils.py +++ b/snakemake_interface_executor_plugins/utils.py @@ -63,7 +63,10 @@ def maybe_encode(value): if isinstance(value, SettingsEnumBase): return value.item_to_choice() elif isinstance(value, Path): - return shlex.quote(str(value)) + if base64_encode: + return encode_as_base64(str(value)) + else: + return shlex.quote(str(value)) elif isinstance(value, str): if is_quoted(value) and not base64_encode: # the value is already quoted, do not quote again