fix(scan): fix nil poiter in needs-restarting (#1767)

This commit is contained in:
Kota Kanbe
2023-10-17 17:58:21 +09:00
committed by GitHub
parent 48ff5196f4
commit 57264e1765
2 changed files with 7 additions and 1 deletions

View File

@@ -500,8 +500,14 @@ func TestParseNeedsRestarting(t *testing.T) {
}{
{
`1 : /usr/lib/systemd/systemd --switched-root --system --deserialize 21kk
30170 :
437 : /usr/sbin/NetworkManager --no-daemon`,
[]models.NeedRestartProcess{
{
PID: "30170",
Path: "",
HasInit: true,
},
{
PID: "437",
Path: "/usr/sbin/NetworkManager --no-daemon",