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

Unable to disable self-update feature #1204

Closed
lcheylus opened this issue Jan 4, 2024 · 2 comments
Closed

Unable to disable self-update feature #1204

lcheylus opened this issue Jan 4, 2024 · 2 comments

Comments

@lcheylus
Copy link

lcheylus commented Jan 4, 2024

I'm building cargo-nextest current version on OpenBSD-current/amd64, using my patch for libc crate (add missing waitid function, see rust-lang/libc#3490) => build OK

$ cargo build -v --no-default-features --features default-no-update

But the "self-update" feature is not disabled with this build:

$ target/debug/cargo-nextest nextest self update --help
Download and install updates to nextest

This command checks the internet for updates to nextest, then downloads and installs them if an update is available.

Usage: cargo nextest self update [OPTIONS]

$ target/debug/cargo-nextest nextest self update
info: checking for self-updates
info: cargo-nextest is already at the latest version: 0.9.66
  • If I try to remove "self-update" feature from default features in cargo-nextest/Cargo.toml:
[features]
default = []

the "self-update" is correctly disabled after build:

$ target/debug/cargo-nextest nextest self update --help
This version of nextest does not have self-update enabled

Always exits with code 93 (SELF_UPDATE_UNAVAILABLE).

Usage: cargo nextest self update [OPTIONS]

$ target/debug/cargo-nextest nextest self update
info: this version of cargo-nextest cannot perform self-updates
(hint: this usually means nextest was installed by a package manager)

I don't understand why "self-update" feature is not disabled using --no-default-features --features default-no-update.

@sunshowers
Copy link
Member

Thanks, fixed in 770b6cc.

@lcheylus
Copy link
Author

lcheylus commented Jan 8, 2024

OK, build the last version with --no-default-features --features default-no-update

$ ./target/debug/cargo-nextest nextest self update --help
This version of nextest does not have self-update enabled

Always exits with code 93 (SELF_UPDATE_UNAVAILABLE).
(...)

./target/debug/cargo-nextest nextest self update
info: this version of cargo-nextest cannot perform self-updates
(hint: this usually means nextest was installed by a package manager)

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants