This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Install-Module: Cannot find path ..\AppData\Local\Temp #660
Open
Description
Steps to reproduce
Install-Module `
-Name "MyModule" `
-Repository "My AzDO feed name" `
-Scope AllUsers `
-RequiredVersion "1.2.3" `
-SkipPublisherCheck `
-Force `
-Confirm:$false `
-Credential $credsVSTS `
-Verbose
Expected behaviour
Install the module
Actual behaviour
PS C:\Windows\system32> C:\Users\some_user\source\ARCOTEK\arc.service.ps.modules\PSAzDOTools\install.ps1
VERBOSE: Repository details, Name = 'ArcGallery', Location = 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Repository details, Name = 'ArcGallery', Location = 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Source 'ArcGallery' already registered on this computer.
VERBOSE: Repository details, Name = 'ArcGallery', Location = 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2'; IsTrusted = 'True'; IsRegistered = 'True'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Using the specified source names : 'ArcGallery'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2/FindPackagesById()?id='PSAzDOTools'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'PSAzDOTools'.
VERBOSE: Performing the operation "Install-Module" on target "Version '1.2.2320' of module 'PSAzDOTools'".
VERBOSE: The installation scope is specified to be 'AllUsers'.
VERBOSE: The specified module will be installed in 'C:\Program Files\WindowsPowerShell\Modules'.
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'PSAzDOTools' with version '1.2.2320' from the repository 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2'.
VERBOSE: Searching repository 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2/FindPackagesById()?id='PSAzDOTools'' for ''.
VERBOSE: InstallPackage' - name='PSAzDOTools', version='1.2.2320',destination='C:\Users\some_user\AppData\Local\Temp\1126213012'
VERBOSE: DownloadPackage' - name='PSAzDOTools', version='1.2.2320',destination='C:\Users\some_user\AppData\Local\Temp\1126213012\PSAzDOTools.1.2.2320\PSAzDOTools.1.2.2320.nupkg',
uri='https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2?id=psazdotools&version=1.2.2320'
VERBOSE: Downloading 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2?id=psazdotools&version=1.2.2320'.
VERBOSE: Completed downloading 'https://pkgs.dev.azure.com/AzDOOrg/_packaging/ArcGallery/nuget/v2?id=psazdotools&version=1.2.2320'.
VERBOSE: Completed downloading 'PSAzDOTools'.
VERBOSE: Hash not found for the package 'PSAzDOTools'.
VERBOSE: InstallPackageLocal' - name='PSAzDOTools', version='1.2.2320',destination='C:\Users\some_user\AppData\Local\Temp\1126213012'
VERBOSE: Validating the 'PSAzDOTools' module contents under 'C:\Users\some_user\AppData\Local\Temp\1126213012\PSAzDOTools.1.2.2320' path.
PackageManagement\Install-Package : Cannot find the path 'C:\Users\some_user\AppData\Local\Temp\1126213012\PSAzDOTools.1.2.2320\PSAzDOTools.psd1' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9711 char:34
+ ... talledPackages = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : PathNotFound,Test-ValidManifestModule,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
What is it trying to do with ..\AppData\Local\Temp\..
? Why does it need that path? This has always worked in the past.
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.1151
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1151
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
> Get-Module -ListAvailable PowerShellGet,PackageManagement
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.4.7 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 2.2.5 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
> Get-PackageProvider -ListAvailable
Name Version DynamicOptions
---- ------- --------------
msi 3.0.0.0 AdditionalArguments
msu 3.0.0.0
NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 2.2.5.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Incl...
Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent
Metadata
Metadata
Assignees
Labels
No labels