Skip to content

Commit

Permalink
fix(cli): set MACOSX_DEPLOYMENT_TARGET env var, closes #4704 (#4842)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Aug 2, 2022
1 parent dcd5066 commit fa23310
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/macos-deployment-target-env-var.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---

Set the `MACOSX_DEPLOYMENT_TARGET` environment variable with the configuration `minimum_system_version` value.
5 changes: 5 additions & 0 deletions tooling/cli/src/interface/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ impl Interface for Rust {
}
manifest
};

if let Some(minimum_system_version) = &config.tauri.bundle.macos.minimum_system_version {
std::env::set_var("MACOSX_DEPLOYMENT_TARGET", minimum_system_version);
}

Ok(Self {
app_settings: RustAppSettings::new(config, manifest)?,
config_features: config.build.features.clone().unwrap_or_default(),
Expand Down

0 comments on commit fa23310

Please sign in to comment.