mirror of https://github.com/tauri-apps/tauri
fix(cli): `ios dev` and `ios build` support for `bun` (#10569)
This commit is contained in:
parent
41c7a6646b
commit
712f1049fa
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
"tauri-cli": patch:bug
|
||||
"@tauri-apps/cli": patch:bug
|
||||
---
|
||||
|
||||
Fixes running `ios dev` and `ios build` using `bun`.
|
|
@ -14,7 +14,7 @@ use clap::Parser;
|
|||
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
env::{current_dir, set_current_dir, var_os},
|
||||
env::{current_dir, set_current_dir, var, var_os},
|
||||
ffi::OsStr,
|
||||
path::{Path, PathBuf},
|
||||
process::Command,
|
||||
|
@ -62,7 +62,10 @@ pub fn command(options: Options) -> Result<()> {
|
|||
}
|
||||
|
||||
// `xcode-script` is ran from the `gen/apple` folder when not using NPM.
|
||||
if var_os("npm_lifecycle_event").is_none() && var_os("PNPM_PACKAGE_NAME").is_none() {
|
||||
// so we must change working directory to the src-tauri folder to resolve the tauri dir
|
||||
if (var_os("npm_lifecycle_event").is_none() && var_os("PNPM_PACKAGE_NAME").is_none())
|
||||
|| var("npm_config_user_agent").map_or(false, |agent| agent.starts_with("bun"))
|
||||
{
|
||||
set_current_dir(current_dir()?.parent().unwrap().parent().unwrap()).unwrap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue