mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Improve error message when unable to initialize git index repo
With this - it'll be more obvious which git repo couldn't be initialized.
This commit is contained in:
parent
8da3cf70cd
commit
168fac4fa3
@ -88,8 +88,9 @@ impl<'cfg> RemoteRegistry<'cfg> {
|
||||
// things that we don't want.
|
||||
let mut opts = git2::RepositoryInitOptions::new();
|
||||
opts.external_template(false);
|
||||
Ok(git2::Repository::init_opts(&path, &opts)
|
||||
.with_context(|| "failed to initialize index git repository")?)
|
||||
Ok(git2::Repository::init_opts(&path, &opts).with_context(|| {
|
||||
format!("failed to initialize index git repository (in {:?})", path)
|
||||
})?)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user