Print initial arguments

This commit is contained in:
Sergio Gasquez 2022-08-12 10:58:22 +00:00
parent d12916109b
commit 248b075976
2 changed files with 34 additions and 0 deletions

View File

@ -134,6 +134,7 @@ fn install(args: InstallOpts) -> Result<()> {
&llvm_version,
arch
);
print_arguments(&args);
let mut exports: Vec<String> = Vec::new();
check_rust_installation(&args.nightly_version);

View File

@ -1,3 +1,4 @@
use crate::InstallOpts;
use console::Emoji;
use dirs::home_dir;
use espflash::Chip;
@ -18,6 +19,7 @@ pub static WARN: Emoji<'_, '_> = Emoji("⚠️ ", "");
pub static WRENCH: Emoji<'_, '_> = Emoji("🔧 ", "");
pub static DOWNLOAD: Emoji<'_, '_> = Emoji("📥 ", "");
pub static INFO: Emoji<'_, '_> = Emoji("💡 ", "");
pub static DISC: Emoji<'_, '_> = Emoji("💽 ", "");
// pub static DIAMOND: Emoji<'_, '_> = Emoji("🔸 ", "");
pub fn parse_targets(build_target: &str) -> Result<Vec<Chip>, String> {
@ -318,3 +320,34 @@ async fn fetch_url(url: String, output: String) -> Result<(), String> {
}
};
}
pub fn print_arguments(args: &InstallOpts) {
println!(
"{} Installing esp-rs with:
- Build targets: {:?}
- Cargo home: {:?}
- Clear cache: {:?}
- ESP-IDF version: {:?}
- Export file: {:?}
- Extra crates: {:?}
- LLVM version: {:?}
- Minified ESP-IDF: {:?}
- Nightly version: {:?}
- Rustup home: {:?}
- Toolchain version: {:?}
- Toolchain destination: {:?}",
DISC,
args.build_target,
&args.cargo_home,
args.clear_cache,
&args.espidf_version,
&args.export_file,
args.extra_crates,
args.llvm_version,
&args.minified_espidf,
args.nightly_version,
&args.rustup_home,
args.toolchain_version,
&args.toolchain_destination
);
}