Skip to content

Commit

Permalink
fix(macos): fallback to env vars for macOS notarization (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinaboos authored Jun 26, 2024
1 parent 74d6b25 commit 44a19ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .changes/pr246.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cargo-packager": "patch"
"@crabnebula/packager": "patch"
---

On macOS, fix notarization skipping needed environment variables when macos specific config has been specified in the config file.
9 changes: 3 additions & 6 deletions crates/packager/src/package/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,9 @@ pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
// notarization is required for distribution
match config
.macos()
.map(|m| {
m.notarization_credentials
.clone()
.ok_or_else(|| crate::Error::MissingNotarizeAuthVars)
})
.unwrap_or_else(codesign::notarize_auth)
.and_then(|m| m.notarization_credentials.clone())
.ok_or(crate::Error::MissingNotarizeAuthVars)
.or_else(|_| codesign::notarize_auth())
{
Ok(auth) => {
tracing::debug!("Notarizing {}", app_bundle_path.display());
Expand Down

0 comments on commit 44a19ea

Please sign in to comment.