Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not apply pushpkg_options if it's empty #22

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 != "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better then use is_empty

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
Loading