File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
55## Development
66
7+ * Ensure the patching.json file exists by creating a blank file if it was previously missing.
8+
9+ Contributed by Bill Sirinek (@sirinek )
10+
711* use 'name' instead of 'host' to better represent targets in inventory
812
913 Contributed by Vadym Chepkov (@vchepkov )
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ if ($result_file -eq '') {
1616 $result_file = ' C:\ProgramData\patching\log\patching.json'
1717}
1818
19+ # if the result file does not exist, create it
20+ if (-not (Test-Path $result_file )) {
21+ New-Item - ItemType " file" - Path (Split-Path - Path $result_file ) - Name (Split-Path - Path $result_file - Leaf) | Out-Null
22+ }
23+
1924$pattern_matches = Select-String - Path $result_file - Pattern " ^{$"
2025if ($pattern_matches ) {
2126 # get the LAST matching line number of { , the start of a JSON document
You can’t perform that action at this time.
0 commit comments