Skip to content

Commit

Permalink
Notify the user with an info if we're ignoring their netrc
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Sep 17, 2024
1 parent bc76dfa commit 04af540
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion magic-nix-cache/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down

0 comments on commit 04af540

Please sign in to comment.