We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8ba801 commit 071ad94Copy full SHA for 071ad94
1 file changed
tasks/update_history_windows.ps1
@@ -16,6 +16,11 @@ if ($result_file -eq '') {
16
$result_file = 'C:\ProgramData\patching\log\patching.json'
17
}
18
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
+
24
$pattern_matches = Select-String -Path $result_file -Pattern "^{$"
25
if ($pattern_matches) {
26
# get the LAST matching line number of { , the start of a JSON document
0 commit comments