From 0b528b5417327d595087da00b5072187fad42b4b Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sun, 8 Jan 2023 23:00:53 -0700 Subject: [PATCH] client/use: The access token should set for the substiter endpoint The substituter endpoint is not necessarily the same as the API endpoint. --- client/src/command/use.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/command/use.rs b/client/src/command/use.rs index 0520943..db651b4 100644 --- a/client/src/command/use.rs +++ b/client/src/command/use.rs @@ -50,7 +50,7 @@ pub async fn run(opts: Opts) -> Result<()> { eprintln!("+ Access Token"); let mut nix_netrc = NixNetrc::load().await?; - let host = Url::parse(&server.endpoint)? + let host = Url::parse(&substituter)? .host() .map(|h| h.to_string()) .unwrap();