From 97ee922076bf52f11560ead94eba22584ae5a596 Mon Sep 17 00:00:00 2001 From: Kexy Biscuit Date: Tue, 6 Aug 2024 19:47:09 +0800 Subject: [PATCH] fix: do not apply pushpkg_options if it's empty --- worker/src/build.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/worker/src/build.rs b/worker/src/build.rs index b11f531..9fc3bfc 100644 --- a/worker/src/build.rs +++ b/worker/src/build.rs @@ -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(),