@@ -195,6 +195,20 @@ runner = "foo" # Searches `PATH` for `foo`.
195
195
directory = " vendor"
196
196
```
197
197
198
+ ### Executable paths with arguments
199
+
200
+ Some Cargo commands invoke external programs, which can be configured as a path
201
+ and some number of arguments.
202
+
203
+ The value may be an array of strings like ` ['/path/to/program', 'somearg'] ` or
204
+ a space-separated string like ` '/path/to/program somearg' ` . If the path to the
205
+ executable contains a space, the list form must be used.
206
+
207
+ If Cargo is passing other arguments to the program such as a path to open or
208
+ run, they will be passed after the last specified argument in the value of an
209
+ option of this format. If the specified program does not have path separators,
210
+ Cargo will search ` PATH ` for its executable.
211
+
198
212
### Credentials
199
213
200
214
Configuration values with sensitive information are stored in the
@@ -406,6 +420,10 @@ The `[doc]` table defines options for the [`cargo doc`] command.
406
420
407
421
##### ` doc.browser `
408
422
423
+ * Type: string or array of strings ([ program path and args] )
424
+ * Default: ` BROWSER ` environment variable, or, if that is missing,
425
+ opening the link in a system specific way
426
+
409
427
This option sets the browser to be used by [ ` cargo doc ` ] , overriding the
410
428
` BROWSER ` environment variable when opening documentation with the ` --open `
411
429
option.
@@ -837,7 +855,7 @@ Specifies the linker which is passed to `rustc` (via [`-C linker`]) when the
837
855
` <triple> ` is being compiled for. By default, the linker is not overridden.
838
856
839
857
##### ` target.<triple>.runner `
840
- * Type: string or array of strings (program path and args)
858
+ * Type: string or array of strings ([ program path and args] )
841
859
* Default: none
842
860
* Environment: ` CARGO_TARGET_<triple>_RUNNER `
843
861
@@ -846,12 +864,6 @@ executed by invoking the specified runner with the actual executable passed as
846
864
an argument. This applies to [ ` cargo run ` ] , [ ` cargo test ` ] and [ ` cargo bench ` ]
847
865
commands. By default, compiled executables are executed directly.
848
866
849
- The value may be an array of strings like ` ['/path/to/program', 'somearg'] ` or
850
- a space-separated string like ` '/path/to/program somearg' ` . The arguments will
851
- be passed to the runner with the executable to run as the last argument. If
852
- the runner program does not have path separators, it will search ` PATH ` for
853
- the runner executable.
854
-
855
867
##### ` target.<cfg>.runner `
856
868
857
869
This is similar to the [ target runner] ( #targettriplerunner ) , but using
@@ -958,6 +970,7 @@ Sets the width for progress bar.
958
970
[ toml ] : https://toml.io/
959
971
[ incremental compilation ] : profiles.md#incremental
960
972
[ profile ] : profiles.md
973
+ [ program path with args ] : #executable-paths-with-arguments
961
974
[ libcurl format ] : https://ec.haxx.se/usingcurl-proxies.html
962
975
[ source replacement ] : source-replacement.md
963
976
[ revision ] : https://git-scm.com/docs/gitrevisions
0 commit comments