You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ModuleFast will now detect if a module was potentially not fully installed and reinstall it. This is done by placing a .incomplete file in install-in-progress folders and checking for it before initiating installations and clearing the folder if it is found.
if (($candidate.IsPrerelease-or$candidate.HasMetadata) -and-not ($currentModuleSpec.PreRelease-or$Prerelease)) {
421
-
Write-Debug"Skipping candidate $candidate because it is a prerelease and prerelease was not specified either with the -Prerelease parameteror with a ! on the module name."
421
+
Write-Debug"${moduleSpec}: skipping candidate $candidate because it is a prerelease and prerelease was not specified either with the -Prerelease parameter, by specifying a prerelease version in the spec, or adding a ! on the module name spec to indicate prerelease is acceptable."
422
422
continue
423
423
}
424
424
425
425
if ($currentModuleSpec.SatisfiedBy($candidate)) {
426
426
#TODO: If the found version still matches an installed version, we should skip it
427
-
Write-Debug"$currentModuleSpec`: Found satisfying version $candidate in the inlined index."
427
+
Write-Debug"${ModuleSpec}: Found satisfying version $candidate in the inlined index."
428
428
$matchingEntry=$entries|Where-Object version -EQ$candidate
429
429
if ($matchingEntry.count-gt1) { throw'Multiple matching Entries found for a specific version. This is a bug and should not happen' }
430
430
$matchingEntry
@@ -638,12 +638,15 @@ function Install-ModuleFastHelper {
638
638
639
639
#Used to keep track of context with Tasks, because we dont have "await" style syntax like C#
@@ -661,7 +664,7 @@ function Install-ModuleFastHelper {
661
664
#Do a prerelease evaluation
662
665
if ($module.ModuleVersion-eq$existingVersion) {
663
666
if ($Update) {
664
-
Write-Verbose"${module}: Existing module found at $installPath and its version $existingVersion is the same as the requested version. -Update was specified so we are assuming that the discovered online version is the same as the local version and skipping this module."
667
+
Write-Verbose"${module}: Existing module found at $installPath and its version $existingVersion is the same as the requested version. -Update was specified so we are assuming that the discovered online version is the same as the local version and skipping this module installation."
665
668
continue
666
669
} else {
667
670
throw [NotImplementedException]"${module}: Existing module found at $installPath and its version $existingVersion is the same as the requested version. This is probably a bug because it should have been detected by localmodule detection. Use -Update to override..."
@@ -709,7 +712,19 @@ function Install-ModuleFastHelper {
709
712
[ValidateNotNullOrEmpty()]$context=$USING:context
710
713
)
711
714
$installPath=$context.InstallPath
712
-
#TODO: Add a ".incomplete" marker file to the folder and remove it when done. This will allow us to detect failed installations
0 commit comments