Skip to content

Commit

Permalink
Merge pull request #7497 from thaJeztah/replace_IsAnInteractiveSession
Browse files Browse the repository at this point in the history
cmd/containerd: replace deprecated windows.IsAnInteractiveSession()
  • Loading branch information
estesp committed Oct 11, 2022
2 parents 9b0ab84 + 8fc68db commit 32aa33a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/containerd/command/service_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,17 @@ func launchService(s *server.Server, done chan struct{}) error {
done: done,
}

interactive, err := svc.IsAnInteractiveSession() // nolint:staticcheck
// Check if we're running as a Windows service or interactively.
isService, err := svc.IsWindowsService()
if err != nil {
return err
}

go func() {
if interactive {
err = debug.Run(serviceNameFlag, h)
} else {
if isService {
err = svc.Run(serviceNameFlag, h)
} else {
err = debug.Run(serviceNameFlag, h)
}
h.fromsvc <- err
}()
Expand Down

0 comments on commit 32aa33a

Please sign in to comment.