Skip to content

Commit cbb59cf

Browse files
committed
more debugging statements
1 parent 8a3887a commit cbb59cf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: tools/appveyor.psm1

+8-2
Original file line numberDiff line numberDiff 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{

0 commit comments

Comments
 (0)