Skip to content

Commit 1f2da26

Browse files
committed
check the path before emitting containerd logs
1 parent 9652dbc commit 1f2da26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/e2e/azure_logcollector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ func windowsK8sLogs(execToPathFn func(outputFileName string, command string, arg
494494
),
495495
execToPathFn(
496496
"containerd.log",
497-
`Get-Content "C:\\var\\log\\containerd\\containerd.log"`,
497+
"$p = 'C:\\var\\log\\containerd\\containerd.log' ; if (Test-Path $p) { Get-Content $p } else { Write-Host \"No containerd logs found at $p\" }",
498498
),
499499
}
500500
}

0 commit comments

Comments
 (0)