mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
feat(cli): improve error message with invalid target for build (#8321)
This commit is contained in:
@@ -228,8 +228,16 @@ impl Interface for Rust {
|
||||
self.app_settings.target_triple.clone(),
|
||||
);
|
||||
|
||||
let mut s = self.app_settings.target_triple.split('-');
|
||||
let (arch, _, host) = (s.next().unwrap(), s.next().unwrap(), s.next().unwrap());
|
||||
let target_triple = &self.app_settings.target_triple;
|
||||
let target_components: Vec<&str> = target_triple.split('-').collect();
|
||||
let (arch, host) = match target_components.as_slice() {
|
||||
[arch, _, host] => (*arch, *host),
|
||||
_ => {
|
||||
log::warn!("Invalid target triple: {}", target_triple);
|
||||
return env;
|
||||
}
|
||||
};
|
||||
|
||||
env.insert(
|
||||
"TAURI_ENV_ARCH",
|
||||
match arch {
|
||||
|
||||
Reference in New Issue
Block a user