You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
When running cargo new foo in the vscode built-in terminal it fails with error $USER env variable is not set but it does so after initializing the package repository foo so now I have repo created but it is not initialized
└── foo
├── .git
└── .gitignore
The expectation is if the command fails there should be no side effect, no folder or git repo created.
Steps
unset USER
cargo new foo
ls
Possible Solution(s) discover_author bails when $USER is not found, so it should be called before init_vcs
Notes
Output of cargo version: cargo 1.47.0 (f3c7e066a 2020-08-28)
The text was updated successfully, but these errors were encountered:
I would also suggest that it could maybe query the operating system for the username. Or, it could just not fill out the authors field and print a warning or something.
Fixes#8783 , cargo new fails without a author name or email
If user can not be obtained from git or env variables $USER, new command defaults to empty author in generated Cargo.toml
Could not edit old PR(#8910 8783) as the original clone was deleted.
Problem
When running
cargo new foo
in the vscode built-in terminal it fails with error$USER
env variable is not set but it does so after initializing the package repositoryfoo
so now I have repo created but it is not initializedThe expectation is if the command fails there should be no side effect, no folder or git repo created.
Steps
unset USER
cargo new foo
ls
Possible Solution(s)
discover_author bails when
$USER
is not found, so it should be called before init_vcsNotes
Output of
cargo version
:cargo 1.47.0 (f3c7e066a 2020-08-28)
The text was updated successfully, but these errors were encountered: