Convert bat to powershell: diffing
This commit is contained in:
parent
055270addc
commit
8811df27c9
1 changed files with 3 additions and 3 deletions
|
|
@ -39,9 +39,9 @@ def comparefiles(importedjsonfile, currentjsonfile) {
|
|||
# echo Diffing sorted json files
|
||||
\$str1 = Get-Content "temp1.txt"
|
||||
\$str2 = Get-Content "temp2.txt"
|
||||
\$diffed = Compare-Object \$str1 \$str2
|
||||
if (\$diffed -ne '') {
|
||||
Write-Host "Difference between JSON files: " \$diffed
|
||||
if (\$str1 -ne \$str2) {
|
||||
Write-Host "Difference between JSON files: "
|
||||
Compare-Object \$str1 \$str2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue