Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Martchus <[email protected]>
Co-authored-by: Tina Müller (tinita) <[email protected]>
  • Loading branch information
3 people authored Nov 16, 2023
1 parent c05c36f commit 591f6cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/OpenQA/WebAPI/Plugin/ObsRsync.pm
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,9 @@ sub _for_every_batch {

# Based on https://www.suse.com/c/multi-factor-authentication-on-suses-build-service/
sub _bs_ssh_sign ($key, $realm, $value) {
die "SSH Key File not found at $key" unless (-e $key || -z $key);
die "SSH key file not found at $key" unless -s $key;
# This needs to be a bit portable for CI testing
my $tmp = Mojo::File::tempfile->spew($value);
my $tmp = Mojo::File::tempfile('obs-rsync-ssh-keyfile-XXXXX')->spew($value);
my @lines = split "\n", qx/ssh-keygen -Y sign -f "$key" -q -n "$realm" < $tmp/;
shift @lines;
pop @lines;
Expand Down

0 comments on commit 591f6cd

Please sign in to comment.