From 8a3887a2394cb7f91f3b725582f95c84962fc4d7 Mon Sep 17 00:00:00 2001
From: James Truher <jimtru@microsoft.com>
Date: Fri, 31 May 2019 16:32:51 -0700
Subject: [PATCH] additional debugging output for appveyor build

---
 tools/appveyor.psm1 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1
index 29c815398..842aa72b8 100644
--- a/tools/appveyor.psm1
+++ b/tools/appveyor.psm1
@@ -53,8 +53,10 @@ function Invoke-AppveyorTest {
 
     # set up env:PSModulePath to the build location, don't copy it to the "normal place"
     $analyzerVersion = ([xml](Get-Content "${CheckoutPath}\Engine\Engine.csproj")).SelectSingleNode(".//VersionPrefix")."#text".Trim()
+    $majorVersion = ([System.Version]$analyzerVersion).Major
 
-    if ( $analyzerVersion -lt 5 ) {
+    Get-ChildItem -rec -file -name "${CheckoutPath}/out" | Write-Verbose -Verbose
+    if ( $majorVersion -lt 5 ) {
         $versionModuleDir = "${CheckoutPath}\out\PSScriptAnalyzer\${analyzerVersion}"
         Rename-Item "${versionModuleDir}" "${CheckoutPath}\out\PSScriptAnalyzer\PSScriptAnalyzer"
         $moduleDir = "${CheckoutPath}\out\PSScriptAnalyzer"