Skip to content

Commit 1f14297

Browse files
committed
Corrected feature gating
1 parent 4391a8c commit 1f14297

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ macros = []
2525
# Application will default to placing configs/logs adjacent to executable
2626
portable = []
2727
# Allow checking the crate's online repository for new Releases
28-
update-check = []
28+
update-check = ["dep:self_update"]
2929
# defaults to Lite.
30-
self-replace = ["dep:self-replace", "portable", "yap-lite", "update-check"]
30+
self-replace = ["dep:self-replace", "dep:reqwest", "portable", "yap-lite", "update-check"]
3131

3232
# GitHub release flavors
3333
# Full should have _all_ features enabled and available

src/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4773,7 +4773,7 @@ impl App {
47734773
let meow = Span::styled(format!(" -> v{new}! [U]pdate found!"), green);
47744774
Line::from_iter(version.into_iter().chain(core::iter::once(meow)))
47754775
} else {
4776-
Line::from(current_version)
4776+
Line::from(version)
47774777
};
47784778

47794779
let me_in_current_year = "nullstalgia, 2025".dark_gray();

src/updates/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ pub enum UpdateError {
335335
HandleDropped,
336336
#[error("error getting update information")]
337337
SelfUpdate(#[from] self_update::errors::Error),
338+
#[cfg(feature = "self-replace")]
338339
#[error("reqwest web error")]
339340
Reqwest(#[from] reqwest::Error),
340341
#[error("error getting response contents")]

0 commit comments

Comments
 (0)