This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
NugetSource doesn't allow UNC Paths #114
Labels
Comments
As far I know UNC path should start from "". Can you please try:
|
Sorry, typo. I was using the \ path. I also tried putting it in " quotes. |
Fun, git hub takes out the leading backslash. |
Here's a more verbose error. PS E:\> Install-Module -NuGetPackageId My-Utils -NugetSource \\mydfs.edu\shared\nuget\ -Destination E:\
local\powershell\modules -Verbose -Update
VERBOSE: Querying '\\mydfs.edu\shared\nuget\/' repository for package with Id 'My-Utils'
Install-Module : Unable to download from NuGet feed: Illegal characters in path.
At line:1 char:1
+ Install-Module -NuGetPackageId My-Utils -NugetSource \\mydfs.edu\shared\nu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-Module |
It looks like function DownloadNuGetPackage {
param (
$NuGetPackageId,
$PackageVersion,
$Source,
$PreRelease,
$PreReleaseTag
)
$WebClient = New-Object -TypeName System.Net.WebClient
$WebClient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
if (-not $Source.EndsWith("/"))
{
$Source += "/"
} |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Trying to install a NugetPackaged script from a UNC path as the nuget source ex: Install-Module -NugetPackageID MyPackage -NugetSource \mydfs.example.com\shared\nuget -Destination e:\local\my\path\to\powershell\modules
Results in:
Install-Module : Unable to download from NuGet feed: Illegal characters in path.
At line:1 char:1
The text was updated successfully, but these errors were encountered: