@@ -22,6 +22,7 @@ function Confirm-MetadataUpdate {
2222
2323 Write-Verbose - Message ' Checking for metadata file...'
2424 $localMetaDataFilePath = [System.IO.Path ]::Combine($script :dataPath , $script :metadataFile )
25+ Write-Debug - Message (' Metadata file path: {0}' -f $localMetaDataFilePath )
2526 try {
2627 $pathEval = Test-Path - Path $localMetaDataFilePath - ErrorAction Stop
2728 }
@@ -33,6 +34,7 @@ function Confirm-MetadataUpdate {
3334
3435 if (-not ($pathEval )) {
3536 $result = $false
37+ Write-Debug - Message ' Metadata file not found.'
3638 } # if_pathEval
3739 else {
3840 Write-Verbose ' Metadata file found. Performing metadata comparison...'
@@ -47,8 +49,10 @@ function Confirm-MetadataUpdate {
4749
4850 $tempMetadataFile = ' {0}_temp' -f $script :metadataFile
4951 $tempMetadataFilePath = [System.IO.Path ]::Combine($script :dataPath , $tempMetadataFile )
52+ Write-Debug - Message (' Temp metadata file path: {0}' -f $tempMetadataFilePath )
5053 # if the temp metadata file exists, delete it
5154 if (Test-Path - Path $tempMetadataFile ) {
55+ Write-Debug - Message ' Removing temp metadata file...'
5256 Remove-Item - Path $tempMetadataFilePath - Force
5357 }
5458
@@ -60,6 +64,7 @@ function Confirm-MetadataUpdate {
6064 return $result
6165 }
6266
67+ Write-Debug - Message ' Getting content of temp metadata file...'
6368 try {
6469 $remoteMetadata = Get-Content $tempMetadataFilePath - ErrorAction ' Stop' | ConvertFrom-Json
6570 }
@@ -69,6 +74,9 @@ function Confirm-MetadataUpdate {
6974 return $result
7075 }
7176
77+ Write-Debug - Message (' Local metadata version: {0}' -f $localMetadata.version )
78+ Write-Debug - Message (' Remote metadata version: {0}' -f $remoteMetadata.version )
79+
7280 Write-Verbose - Message (' {0} vs {1}' -f $localMetadata.version , $remoteMetadata.version )
7381 if ($localMetadata.version -eq $remoteMetadata.version ) {
7482 Write-Verbose ' Metadata file is current.'
0 commit comments