Not right: Cargo uses your git configuration, among other environment variables .
To override it, you must set the environment variables CARGO_EMAIL and CARGO_NAME when starting the load. For instance:
CARGO_NAME=not-ross cargo new --bin project_name
For instance:
simon /c/rust $ CARGO_NAME=Not-Simon CARGO_EMAIL=not_simon@not _simon.com cargo new --bin override-author Created binary (application) `override-author` project simon /c/rust $ cd !$ simon /c/rust/override-author (master) $ cat Cargo.toml [package] name = "override-author" version = "0.1.0" authors = ["Not-Simon < not_simon@not _simon.com>"] [dependencies]
Using CARGO_NAME and CARGO_EMAIL , you can cargo determine the authorβs name and email address in a higher "area". If you look at the code in more detail, it will check git first, but you can override it with the --vcs flag, which will still use CARGO_NAME and CARGO_EMAIL , if provided.
source share