allow rust hooks to specify arbitrary cargo install parameters

We've replaced the previous "--feature=" format with a single parameter
"--" which marks the start of the "cargo install" arguments, so now we
can use "-- --features foo", "-- --locked", etc.

Fixes #3162
This commit is contained in:
Terseus 2024-07-11 21:12:48 +02:00
parent bd153a698a
commit 558793bbc2
2 changed files with 22 additions and 23 deletions

View file

@ -125,6 +125,6 @@ def test_run_features_additional_dependencies(tmp_path):
_make_hello_world(tmp_path)
deps = ('shellharden:4.2.0', 'git-version')
features = ('--feature=foo',)
ret = run_language(tmp_path, rust, 'hello_world', deps=deps + features)
cargo_params = ('--', '--features', 'foo')
ret = run_language(tmp_path, rust, 'hello_world', deps=deps + cargo_params)
assert ret == (0, b'Hello, world!\nWith feature foo\n')