@@ -111,7 +111,7 @@ function Get-ModuleFastPlan {
111111 try {
112112 foreach ($moduleSpec in $ModulesToResolve ) {
113113 $localMatch = Find-LocalModule $moduleSpec
114- if ($localMatch ) {
114+ if ($localMatch -and -not $Update ) {
115115 Write-Verbose " Found local module $localMatch that satisfies $moduleSpec . Skipping..."
116116 # TODO: Capture this somewhere that we can use it to report in the deploy plan
117117 continue
@@ -338,7 +338,7 @@ function Get-ModuleFastPlan {
338338 # TODO: Figure out a way to dedupe this logic maybe recursively but I guess a function would be fine too
339339 foreach ($dependencySpec in $dependenciesToResolve ) {
340340 $localMatch = Find-LocalModule $dependencySpec
341- if ($localMatch ) {
341+ if ($localMatch -and -not $Update ) {
342342 Write-Verbose " Found local module $localMatch that satisfies dependency $dependencySpec . Skipping..."
343343 # TODO: Capture this somewhere that we can use it to report in the deploy plan
344344 continue
@@ -1079,7 +1079,11 @@ function Find-LocalModule {
10791079 # BUG: Prerelease Module paths are still not recognized by internal PS commands and can break things
10801080
10811081 # Search all psmodulepaths for the module
1082- $modulePaths = $env: PSModulePath -split [Path ]::PathSeparator
1082+ $modulePaths = $env: PSModulePath -split ([Path ]::PathSeparator, [StringSplitOptions ]::RemoveEmptyEntries)
1083+ if (-Not $modulePaths ) {
1084+ Write-Warning ' No PSModulePaths found in $env:PSModulePath. If you are doing isolated testing you can disregard this.'
1085+ return
1086+ }
10831087
10841088 # NOTE: We are intentionally using return instead of continue here, as soon as we find a match we are done.
10851089 foreach ($modulePath in $modulePaths ) {
0 commit comments