File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 3737 <_CopilotBinary Condition =" '$(_CopilotBinary)' == ''" >copilot</_CopilotBinary >
3838 </PropertyGroup >
3939
40+ <!-- Allow customization of the npm registry URL used to download the Copilot CLI.
41+ This is primarily for organizations using private or mirrored npm registries.
42+ Set CopilotNpmRegistryUrl in your .csproj or Directory.Build.props, for example:
43+ <PropertyGroup>
44+ <CopilotNpmRegistryUrl>https://your-private-registry.example.com</CopilotNpmRegistryUrl>
45+ </PropertyGroup>
46+ If not set, this defaults to https://registry.npmjs.org. -->
47+ <PropertyGroup >
48+ <CopilotNpmRegistryUrl Condition =" '$(CopilotNpmRegistryUrl)' == ''" >https://registry.npmjs.org</CopilotNpmRegistryUrl >
49+ </PropertyGroup >
50+
4051 <!-- Download and extract CLI binary -->
4152 <Target Name =" _DownloadCopilotCli" BeforeTargets =" BeforeBuild" Condition =" '$(_CopilotPlatform)' != ''" >
4253 <Error Condition =" '$(CopilotCliVersion)' == ''" Text =" CopilotCliVersion is not set. The GitHub.Copilot.SDK.props file may be missing from the NuGet package." />
4657 <_CopilotCacheDir >$(IntermediateOutputPath)copilot-cli\$(CopilotCliVersion)\$(_CopilotPlatform)</_CopilotCacheDir >
4758 <_CopilotCliBinaryPath >$(_CopilotCacheDir)\$(_CopilotBinary)</_CopilotCliBinaryPath >
4859 <_CopilotArchivePath >$(_CopilotCacheDir)\copilot.tgz</_CopilotArchivePath >
49- <_CopilotDownloadUrl >https://registry.npmjs.org/@github/copilot-$(_CopilotPlatform)/-/copilot-$(_CopilotPlatform)-$(CopilotCliVersion).tgz</_CopilotDownloadUrl >
60+ <_CopilotNormalizedRegistryUrl >$([System.String]::Copy('$(CopilotNpmRegistryUrl)').TrimEnd('/'))</_CopilotNormalizedRegistryUrl >
61+ <_CopilotDownloadUrl >$(_CopilotNormalizedRegistryUrl)/@github/copilot-$(_CopilotPlatform)/-/copilot-$(_CopilotPlatform)-$(CopilotCliVersion).tgz</_CopilotDownloadUrl >
5062 </PropertyGroup >
5163
5264 <!-- Delete archive if binary missing (handles partial/corrupted downloads) -->
You can’t perform that action at this time.
0 commit comments