Skip to content

Commit 0f79ebf

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
move cratesio definition to env var
1 parent 883cb27 commit 0f79ebf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.cargo/config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ registry-auth = true
44

55
[registries]
66
powershell = { index = "sparse+https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/Cargo/index/" }
7-
cratesio = { index = "sparse+https://index.crates.io/"}
87

98
[registry]
109
global-credential-providers = ["cargo:token"]

build.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,12 @@ if (!$SkipBuild) {
175175
if (!$UseCFS) {
176176
# this will override the config.toml
177177
Write-Host "Setting CARGO_SOURCE_crates-io_REPLACE_WITH to 'crates-io'"
178-
${env:CARGO_SOURCE_crates-io_REPLACE_WITH} = 'cratesio'
178+
${env:CARGO_SOURCE_crates-io_REPLACE_WITH} = 'CRATESIO'
179+
$env:CARGO_REGISTRIES_CRATESIO_INDEX = 'sparse+https://index.crates.io/'
179180
} else {
180181
Write-Host "Using CFS for cargo source replacement"
181182
${env:CARGO_SOURCE_crates-io_REPLACE_WITH} = $null
183+
$env:CARGO_REGISTRIES_CRATESIO_INDEX = $null
182184
}
183185

184186
# make sure dependencies are built first so clippy runs correctly

0 commit comments

Comments
 (0)