Closed brwilkinson closed 3 years ago
@brwilkinson Looks like we need to suppress the prompt when calling the underlying Install-Modulle cmdlet.
@markcowl yes hopefully -force can be passes straight through.
@markcowl One other question, is the module using start-job for the background jobs or start-threadjob ?
I might be worth leveraging the threadjobs since it's move efficient overall.
@msJinLei @VeryEarly can you have a look?
Hi @brwilkinson ,
This tool is built on top of PowershellGet (Packagemanagement), applying "-Force" parameter to them while running multi-task makes the performance terrible.
There is a certain bug though this cmdlet should not execute when the given repository was not trusted. Will do the fix in later release.
@VeryEarly okay, what do you recommend to perform the install then ?
i.e. the public psgallery is untrusted for a reason, I am not going to just trust it .. so I would like to just override the default when I explicitly want to install a particular module.
So was the expectation that I should Trust PSGallery for these to work (without -Force) ?
I'll say make PSGallery trusted is the solution.
The purpose of this module is to provide easy way to manage Az module, for particular module you can always use Install-Module (Install-AzModule also works though).
@VeryEarly
I think we will need to come up with a better solution than making the public gallery trusted.
No one in the PowerShell community is going to buy into that (I don't believe).
I can ask on twitter, however I don't have many followers . . . however I am sure people would agree they are not going to make it trusted.
@brwilkinson thanks for the feedback, the module is in preview and we will evaluate the options how to address this scenario in the best possible way. Unfortunately, for the time being, we do not have a better solution than trusting the PSGallery.
quick question, if you evaluate the requirement to update any specific module, then run that update within a child job, can't you just pass the -Force in, since it's only targeting a single module ?
I think I understand why you prefer not to use force when install a suite of modules, since it would cause them all to install, however with just a single call for each, I don't think it would make any difference on efficiency ?
Sure @dcaro I understand, I am just offering some early feedback... I may test trusting the psgallery as a temporary (workaround) measure to find some more product issues with az.tools.installer, however I would switch it back when I am not testing.
Here is the thread on Trusting the gallery, I don't have many followers, however Steve does... so quite a few replies
quick question, if you evaluate the requirement to update any specific module, then run that update within a child job, can't you just pass the -Force in, since it's only targeting a single module ?
I think I understand why you prefer not to use force when install a suite of modules, since it would cause them all to install, however with just a single call for each, I don't think it would make any difference on efficiency ?
Sure @dcaro I understand, I am just offering some early feedback... I may test trusting the psgallery as a temporary (workaround) measure to find some more product issues with az.tools.installer, however I would switch it back when I am not testing.
Hi @brwilkinson
Pass '-Force' to a single module should be OK, however the behavior could be inconsistent between install multiple/single. We are still working on a better design.
@veryearly I think it was mentioned earlier in the thread, however just to add again. There are some changes with how -Force in implemented in PowerShellGet 3.0.0 <-- so it's likely worth aligning this toolset with new version of the module that is currently in preview. e.g. powershellget\Install-PSResource
Not sure what happened with this functionality, I assume moving download to zip package, then extract was the fix for improving install efficiency.
Closing due to age.
Description
When runing the following, it appears a prompt is still showing for Trusted gallery ?
Steps to reproduce
Environment data
Appears the same on PS 5.1 or &.0.3.
Module versions
0.1.0 Az.Tools.Installer 2.2.4.1 PowerShellGet
Error output
Debug output
Tested with just a single module AZ.Resources . . . found this other issue #13130