Skip to content

Commit e7392a3

Browse files
authored
Merge pull request #5893 from zylxjtu/main
check the path before emitting containerd logs from windows node
2 parents 9652dbc + 1f2da26 commit e7392a3

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)