Skip to content

Commit

Permalink
enh: unify untrusted execution flags
Browse files Browse the repository at this point in the history
This commit uses `--allow-untrusted_exection`
in `datalad make` and `allow-untrusted-execution`
in the annex remote.
  • Loading branch information
christian-monch committed Nov 8, 2024
1 parent e58fd0d commit 9e2b642
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion datalad_remake/annexremotes/tests/test_hierarchies.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_end_to_end(tmp_path, monkeypatch, output_pattern):
],
output=output_pattern,
result_renderer='disabled',
allow_untrusted_code=True,
allow_untrusted_execution=True,
)

collected_output = [
Expand Down
8 changes: 4 additions & 4 deletions datalad_remake/commands/make_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class Make(ValidatedInterface):
'before used. This is useful if a large number of parameters '
'should be provided.',
),
'allow_untrusted_code': Parameter(
args=('--allow-untrusted-code',),
'allow_untrusted_execution': Parameter(
args=('--allow-untrusted-execution',),
action='store_true',
default=False,
doc='Skip commit signature verification before executing code. This '
Expand Down Expand Up @@ -197,7 +197,7 @@ def __call__(
output_list: Path | None = None,
parameter: list[str] | None = None,
parameter_list: Path | None = None,
allow_untrusted_code: bool = False,
allow_untrusted_execution: bool = False,
) -> Generator:
ds: Dataset = dataset.ds if dataset else Dataset('.')

Expand All @@ -224,7 +224,7 @@ def __call__(
template,
parameter_dict,
output_pattern,
None if allow_untrusted_code else get_trusted_keys(),
None if allow_untrusted_execution else get_trusted_keys(),
)
resolved_output = collect(worktree, ds, output_pattern)
else:
Expand Down
2 changes: 1 addition & 1 deletion datalad_remake/commands/tests/test_make.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _run_simple_computation(root_dataset: Dataset):
parameter=['name=Robert', 'file=a.txt'],
output=['a.txt'],
result_renderer='disabled',
allow_untrusted_code=True,
allow_untrusted_execution=True,
)

# check that the output is correct
Expand Down

0 comments on commit 9e2b642

Please sign in to comment.