This repository was archived by the owner on Dec 18, 2017. It is now read-only.
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
Can not upgrade behind a proxy server that requires credentials #453
Closed
Description
Title
Can not upgrade behind a proxy server that requires credentials.
Functional impact
There seems to be a bug with upgrading behind a proxy server.
Minimal repro steps
I'm on dnvm v1.0.0-beta8-15506 (latest at time of writing).
- Use a network connection with a proxy server that requires credentials.
- Specify a proxy server argument to upgrade:
dnvm upgrade -Proxy <server>:<port>
Expected result
Should upgrade okay.
Actual result
Fails to upgrade.
Determining latest version
Unable to find any runtime packages on the feed!
At C:\Users\<user>\.dnx\bin\dnvm.ps1:584 char:9
+ throw "Unable to find any runtime packages on the feed!"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Unable to find ...es on the feed!:String) [], RuntimeException
+ FullyQualifiedErrorId : Unable to find any runtime packages on the feed!
Further technical details
The -Proxy
parameter is not being passed to the method calls Find-Latest
and Invoke-NuGetWebRequest
. Editing C:\Users\<user>\.dnx\bin\dnvm.ps1
line 1335 from:
$findPackageResult = Find-Latest -runtimeInfo:$runtimeInfo -Feed:$selectedFeed
... to:
$findPackageResult = Find-Latest -runtimeInfo:$runtimeInfo -Feed:$selectedFeed -Proxy:$Proxy
... produces a much more pleasing:
Determining latest version
'dnx-clr-win-x86.1.0.0-beta7' is already installed in C:\Users\<user>\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta7.
Adding C:\Users\<user>\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta7\bin to process PATH
Adding C:\Users\<user>\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta7\bin to user PATH
Updating alias 'default' to 'dnx-clr-win-x86.1.0.0-beta7'
Also, you might as well also add the proxy on line 1338, from:
$findPackageResult = Find-Package -runtimeInfo:$runtimeInfo -Feed:$selectedFeed
...to:
$findPackageResult = Find-Package -runtimeInfo:$runtimeInfo -Feed:$selectedFeed -Proxy:$Proxy
This was originally reported (issue, PR) in the Home repo; moved to dnvm repo by request.