client/use: The access token should set for the substiter endpoint

The substituter endpoint is not necessarily the same as the API
endpoint.
This commit is contained in:
Zhaofeng Li 2023-01-08 23:00:53 -07:00
parent c4f843d4ab
commit 0b528b5417

View file

@ -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();