Skip to content

Commit

Permalink
fix: do not apply pushpkg_options if it's empty
Browse files Browse the repository at this point in the history
  • Loading branch information
KexyBiscuit committed Aug 6, 2024
1 parent d38658b commit 97ee922
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions worker/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,22 +288,24 @@ async fn build(

if build_success {
if let Some(upload_ssh_key) = &args.upload_ssh_key {
let mut args = vec![
let mut pushpkg_args = vec![
"--host",
&args.rsync_host,
"-i",
upload_ssh_key,
&args.pushpkg_options,
"maintainers",
&job.git_branch,
];
if &args.pushpkg_options != "" {
pushpkg_args.insert(0, &args.pushpkg_options);
}
if &job.git_branch != "stable" {
// allow force push if noarch and non stable
args.insert(0, "--force-push-noarch-package");
pushpkg_args.insert(0, "--force-push-noarch-package");
}
pushpkg_success = run_logged_with_retry(
"pushpkg",
&args,
&pushpkg_args,
&output_path,
&mut logs,
tx.clone(),
Expand Down

0 comments on commit 97ee922

Please sign in to comment.