Skip to content

Commit 5915f40

Browse files
committed
chore(just): support running main executable by omitting bin name
1 parent cabb434 commit 5915f40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ _run-with-test-reqs *cmd: _before-test && _after-test
5959
{{cmd}}
6060

6161
# Run an executable
62-
run bin_name *extra_args: (_run-it "--bin" bin_name extra_args)
62+
run bin_name="" *extra_args: (_run-it "--bin" bin_name extra_args)
6363

6464
# Run an example
6565
teach example_name *extra_args: (_run-it "--example" example_name extra_args)
6666

6767
_run-it run_param run_param_value *extra_args:
68-
{{cargo}} run {{package_only_flag}} {{all_features_flag}} {{target_tuple_flag}} {{release_flag}} {{run_param}} {{run_param_value}} {{ if extra_args != '' { '-- ' + extra_args } else { '' } }}
68+
{{cargo}} run {{package_only_flag}} {{all_features_flag}} {{target_tuple_flag}} {{release_flag}} {{ if run_param_value != '' { run_param + ' ' + run_param_value } else { '' } }} {{ if extra_args != '' { '-- ' + extra_args } else { '' } }}
6969

7070
# Run `cargo hack clippy` for the feature powerset and rustfmt
7171
tidy: clippy fmt

0 commit comments

Comments
 (0)