Notify the user with an info if we're ignoring their netrc

This commit is contained in:
Graham Christensen 2024-09-17 17:23:44 -04:00
parent bc76dfa4df
commit 04af54090e

View file

@ -245,7 +245,11 @@ async fn main_cli() -> Result<()> {
let narinfo_negative_cache = Arc::new(RwLock::new(HashSet::new()));
let auth_method: FlakeHubAuthSource = match (args.flakehub_api_server_netrc, dnixd_available) {
(_, true) => FlakeHubAuthSource::DeterminateNixd,
(None, true) => FlakeHubAuthSource::DeterminateNixd,
(Some(_), true) => {
tracing::info!("Ignoring the user-specified --flakehub-api-server-netrc, in favor of the determinate-nixd netrc");
FlakeHubAuthSource::DeterminateNixd
}
(Some(path), false) => FlakeHubAuthSource::Netrc(path),
(None, false) => {
return Err(anyhow!(