Skip to content

Commit

Permalink
config: Only check notes file/private key args if required
Browse files Browse the repository at this point in the history
  • Loading branch information
derrod committed Feb 13, 2024
1 parent 26d9311 commit 385f1fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/models/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,13 @@ impl Config {
self.package.installer.skip = args.skip_installer || self.package.installer.skip;
self.package.updater.skip_sign = args.skip_manifest_signing || self.package.updater.skip_sign;

if let Some(privkey) = &args.private_key {
self.package.updater.private_key = Some(privkey.to_owned());
}
if let Some(notes_file) = &args.notes_file {
self.package.updater.notes_file = fs::canonicalize(notes_file)?;
if !args.packaging_only {
if let Some(privkey) = &args.private_key {
self.package.updater.private_key = Some(privkey.to_owned());
}
if let Some(notes_file) = &args.notes_file {
self.package.updater.notes_file = fs::canonicalize(notes_file)?;
}
}

self.validate(false, args.packaging_only)
Expand Down

0 comments on commit 385f1fa

Please sign in to comment.