File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,17 @@ function Invoke-AppveyorTest {
5454 # set up env:PSModulePath to the build location, don't copy it to the "normal place"
5555 $analyzerVersion = ([xml ](Get-Content " ${CheckoutPath} \Engine\Engine.csproj" )).SelectSingleNode(" .//VersionPrefix" )." #text" .Trim()
5656 $majorVersion = ([System.Version ]$analyzerVersion ).Major
57+ $psMajorVersion = $PSVersionTable.PSVersion.Major
5758
5859 Get-ChildItem - rec - file - name " ${CheckoutPath} /out" | Write-Verbose - Verbose
59- if ( $majorVersion -lt 5 ) {
60+ Write-Verbose - verbose " version is $majorVersion "
61+ if ( $psMajorVersion -lt 5 ) {
6062 $versionModuleDir = " ${CheckoutPath} \out\PSScriptAnalyzer\${analyzerVersion} "
61- Rename-Item " ${versionModuleDir} " " ${CheckoutPath} \out\PSScriptAnalyzer\PSScriptAnalyzer"
63+ $renameTarget = " ${CheckoutPath} \out\PSScriptAnalyzer\PSScriptAnalyzer"
64+ Write-Verbose - Verbose " versionModuleDir: ${versionModuleDir} "
65+ Write-Verbose - Verbose " renameTarget: ${renameTarget} "
66+ Write-Verbose - Verbose " target exists: $ ( Test-Path $renameTarget ) "
67+ Rename-Item " ${versionModuleDir} " " ${renameTarget} "
6268 $moduleDir = " ${CheckoutPath} \out\PSScriptAnalyzer"
6369 }
6470 else {
You can’t perform that action at this time.
0 commit comments