mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 14:40:44 +00:00
Made clone_repo error clear.
This commit is contained in:
parent
9ce5fc508d
commit
60eb453aad
2 changed files with 9 additions and 5 deletions
|
@ -1,8 +1,6 @@
|
|||
use std::process::exit;
|
||||
|
||||
use dioxus_rsx::{BodyNode, CallBody, Component};
|
||||
use proc_macro2::{Ident, Span};
|
||||
use syn::punctuated::Punctuated;
|
||||
use dioxus_rsx::{BodyNode, CallBody};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
10
src/tools.rs
10
src/tools.rs
|
@ -1,6 +1,6 @@
|
|||
use std::{
|
||||
fs::{create_dir_all, File},
|
||||
io::{Read, Write},
|
||||
io::{Read, Write, ErrorKind},
|
||||
path::{Path, PathBuf},
|
||||
process::Command,
|
||||
};
|
||||
|
@ -46,7 +46,13 @@ pub fn clone_repo(dir: &Path, url: &str) -> anyhow::Result<()> {
|
|||
|
||||
let mut cmd = Command::new("git");
|
||||
let cmd = cmd.current_dir(target_dir);
|
||||
let _res = cmd.arg("clone").arg(url).arg(dir_name).output()?;
|
||||
let res = cmd.arg("clone").arg(url).arg(dir_name).output();
|
||||
if let Err(err) = res {
|
||||
if ErrorKind::NotFound == err.kind() {
|
||||
log::error!("Git program not found. Hint: Install git or check $PATH.");
|
||||
return Err(err.into());
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue