mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-30 06:58:49 +02:00
Updated check-xml-file.ps1
This commit is contained in:
parent
7d247e379f
commit
7bc0509211
@ -7,7 +7,7 @@
|
|||||||
Specifies the path to the XML file
|
Specifies the path to the XML file
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-xml-file.ps1 myfile.xml
|
PS> ./check-xml-file.ps1 myfile.xml
|
||||||
✅ Valid XML in 📄myfile.xml
|
✅ myfile.xml is valid XML
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -34,7 +34,7 @@ try {
|
|||||||
|
|
||||||
if ($script:ErrorCount -gt 0) { throw "Invalid XML" }
|
if ($script:ErrorCount -gt 0) { throw "Invalid XML" }
|
||||||
|
|
||||||
"✅ Valid XML in 📄$path"
|
"✅ $path is valid XML"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ $($Error[0]) in 📄$path"
|
"⚠️ $($Error[0]) in 📄$path"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user