Skip to content

Commit

Permalink
Merge pull request #1084 from christiangnrd/emptyversion
Browse files Browse the repository at this point in the history
Prevent compiler warning without panicking
  • Loading branch information
davidanthoff authored Oct 27, 2024
2 parents 72d844e + de651e1 commit 8825a23
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/command_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,14 @@ fn update_channel(
server_etag,
version,
} => {
// We only do this so that we use `version` on both Windows and Linux to prevent a compiler warning/error
assert!(!version.is_empty());

if local_etag != server_etag {
// We only do this so that we use `version` on both Windows and Linux to prevent a compiler warning/error
if version.is_empty() {
eprintln!(
"Channel {} version is empty, you may need to manually codesign this channel if you trust the contents of this pull request.",
channel
);
}
eprintln!("{} channel {}", style("Updating").green().bold(), channel);

let channel_data =
Expand Down

0 comments on commit 8825a23

Please sign in to comment.