-
Notifications
You must be signed in to change notification settings - Fork 53
Description
The no_proxy variable is unfortunately notorious in having different interpretations with different runtimes, tools, etc. pp.
Recently a server administrator set a rule, that all servers now will have environment variables for http_proxy, https_proxy and no_proxy.
The no_proxy containing *.example.com as value (the * is not necessary, so the workaround is simple) leads to the DotNetCoreCLI@2 Task to fail with a error message like this:
##[error]SyntaxError: Invalid regular expression: /*.example.com/: Nothing to repeat
##[error]Packages failed to restore
I think I traced the problem down to
azure-pipelines-tasks-common-packages/common-npm-packages/packaging-common/nuget/NuGetToolRunner2.ts
Line 409 in 1f07b94
export function getProxyBypassForConfig(configFile: string): string { |
The task I used like this (nothing fancy I think):
task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: <...>
selectOrConfig: config
nugetConfigPath: projects/netcore/NuGet.Config
verbosityRestore: Normal
The problem did show up in Azure Devops Agent 3.328.0