File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,17 @@ function Invoke-AppveyorTest {
54
54
# set up env:PSModulePath to the build location, don't copy it to the "normal place"
55
55
$analyzerVersion = ([xml ](Get-Content " ${CheckoutPath} \Engine\Engine.csproj" )).SelectSingleNode(" .//VersionPrefix" )." #text" .Trim()
56
56
$majorVersion = ([System.Version ]$analyzerVersion ).Major
57
+ $psMajorVersion = $PSVersionTable.PSVersion.Major
57
58
58
59
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 ) {
60
62
$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} "
62
68
$moduleDir = " ${CheckoutPath} \out\PSScriptAnalyzer"
63
69
}
64
70
else {
You can’t perform that action at this time.
0 commit comments