Skip to content

Commit

Permalink
rename SKIP_DOWNLOAD -> BITCOIND_SKIP_DOWNLOAD
Browse files Browse the repository at this point in the history
  • Loading branch information
RCasatta committed Apr 4, 2024
1 parent a4c044e commit 0a35cb2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ auto-download feature does exactly that. To successfully build under Nix the
user must provide the tarball locally and specify its location via the
`BITCOIND_TARBALL_FILE` env var.

Another option is to specify the `SKIP_DOWNLOAD` env var and provide the
Another option is to specify the `BITCOIND_SKIP_DOWNLOAD` env var and provide the
executable via the `PATH`.

Alternatively, use the dep without auto-download feature.
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mod download {
}

pub(crate) fn start() -> anyhow::Result<()> {
if std::env::var_os("SKIP_DOWNLOAD").is_some() {
if std::env::var_os("BITCOIND_SKIP_DOWNLOAD").is_some() {
return Ok(());
}
let download_filename = download_filename();
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub enum Error {
/// Returned when -rpcuser and/or -rpcpassword is used in `Conf` args
/// It will soon be deprecated, please use -rpcauth instead
RpcUserAndPasswordUsed,
/// Returned when expecting an auto-downloaded executable but `SKIP_DOWNLOAD` env var is set
/// Returned when expecting an auto-downloaded executable but `BITCOIND_SKIP_DOWNLOAD` env var is set
SkipDownload,
}

Expand All @@ -138,7 +138,7 @@ impl fmt::Debug for Error {
Error::EarlyExit(e) => write!(f, "The bitcoind process terminated early with exit code {}", e),
Error::BothDirsSpecified => write!(f, "tempdir and staticdir cannot be enabled at same time in configuration options"),
Error::RpcUserAndPasswordUsed => write!(f, "`-rpcuser` and `-rpcpassword` cannot be used, it will be deprecated soon and it's recommended to use `-rpcauth` instead which works alongside with the default cookie authentication"),
Error::SkipDownload => write!(f, "expecting an auto-downloaded executable but `SKIP_DOWNLOAD` env var is set"),
Error::SkipDownload => write!(f, "expecting an auto-downloaded executable but `BITCOIND_SKIP_DOWNLOAD` env var is set"),
}
}
}
Expand Down Expand Up @@ -499,7 +499,7 @@ pub fn downloaded_exe_path() -> anyhow::Result<String> {
/// Provide the bitcoind executable path if a version feature has been specified
#[cfg(feature = "download")]
pub fn downloaded_exe_path() -> anyhow::Result<String> {
if std::env::var_os("SKIP_DOWNLOAD").is_some() {
if std::env::var_os("BITCOIND_SKIP_DOWNLOAD").is_some() {
return Err(Error::SkipDownload.into());
}

Expand Down

0 comments on commit 0a35cb2

Please sign in to comment.