Skip to content

Commit 29a181e

Browse files
committed
Set cwd for cargo udeps ...
1 parent ee41c50 commit 29a181e

File tree

1 file changed

+1
-0
lines changed
  • onlinejudge_verify/languages

1 file changed

+1
-0
lines changed

onlinejudge_verify/languages/rust.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def _list_dependencies_by_crate(path: pathlib.Path, *, basedir: pathlib.Path, ca
8888
raise RuntimeError('`cargo-udeps` not in $PATH')
8989
unused_deps = json.loads(subprocess.run(
9090
['rustup', 'run', cargo_udeps_toolchain, 'cargo', 'udeps', '--output', 'json', '--manifest-path', main_package['manifest_path'], *_target_option(main_target)],
91+
cwd=metadata['workspace_root'],
9192
check=False,
9293
stdout=PIPE,
9394
).stdout.decode())['unused_deps'].values()

0 commit comments

Comments
 (0)