@@ -203,6 +203,20 @@ runner = "foo" # Searches `PATH` for `foo`.
203
203
directory = " vendor"
204
204
```
205
205
206
+ ### Executable paths with arguments
207
+
208
+ Some Cargo commands invoke external programs, which can be configured as a path
209
+ and some number of arguments.
210
+
211
+ The value may be an array of strings like ` ['/path/to/program', 'somearg'] ` or
212
+ a space-separated string like ` '/path/to/program somearg' ` . If the path to the
213
+ executable contains a space, the list form must be used.
214
+
215
+ If Cargo is passing other arguments to the program such as a path to open or
216
+ run, they will be passed after the last specified argument in the value of an
217
+ option of this format. If the specified program does not have path separators,
218
+ Cargo will search ` PATH ` for its executable.
219
+
206
220
### Credentials
207
221
208
222
Configuration values with sensitive information are stored in the
@@ -425,6 +439,10 @@ The `[doc]` table defines options for the [`cargo doc`] command.
425
439
426
440
##### ` doc.browser `
427
441
442
+ * Type: string or array of strings ([ program path and args] )
443
+ * Default: ` BROWSER ` environment variable, or, if that is missing,
444
+ opening the link in a system specific way
445
+
428
446
This option sets the browser to be used by [ ` cargo doc ` ] , overriding the
429
447
` BROWSER ` environment variable when opening documentation with the ` --open `
430
448
option.
@@ -856,7 +874,7 @@ Specifies the linker which is passed to `rustc` (via [`-C linker`]) when the
856
874
` <triple> ` is being compiled for. By default, the linker is not overridden.
857
875
858
876
##### ` target.<triple>.runner `
859
- * Type: string or array of strings (program path and args)
877
+ * Type: string or array of strings ([ program path and args] )
860
878
* Default: none
861
879
* Environment: ` CARGO_TARGET_<triple>_RUNNER `
862
880
@@ -865,12 +883,6 @@ executed by invoking the specified runner with the actual executable passed as
865
883
an argument. This applies to [ ` cargo run ` ] , [ ` cargo test ` ] and [ ` cargo bench ` ]
866
884
commands. By default, compiled executables are executed directly.
867
885
868
- The value may be an array of strings like ` ['/path/to/program', 'somearg'] ` or
869
- a space-separated string like ` '/path/to/program somearg' ` . The arguments will
870
- be passed to the runner with the executable to run as the last argument. If
871
- the runner program does not have path separators, it will search ` PATH ` for
872
- the runner executable.
873
-
874
886
##### ` target.<cfg>.runner `
875
887
876
888
This is similar to the [ target runner] ( #targettriplerunner ) , but using
@@ -977,6 +989,7 @@ Sets the width for progress bar.
977
989
[ toml ] : https://toml.io/
978
990
[ incremental compilation ] : profiles.md#incremental
979
991
[ profile ] : profiles.md
992
+ [ program path with args ] : #executable-paths-with-arguments
980
993
[ libcurl format ] : https://ec.haxx.se/usingcurl-proxies.html
981
994
[ source replacement ] : source-replacement.md
982
995
[ revision ] : https://git-scm.com/docs/gitrevisions
0 commit comments