MCPcopy Index your code
hub / github.com/devspace-sh/devspace / ExitCode

Function ExitCode

helper/ssh/server.go:293–305  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

291}
292
293func ExitCode(err error) int {
294 err = errors.Cause(err)
295 if err == nil {
296 return 0
297 }
298
299 exitErr, ok := err.(*exec.ExitError)
300 if !ok {
301 return 1
302 }
303
304 return exitErr.ExitCode()
305}
306
307func (s *Server) ListenAndServe() error {
308 stderrlog.Infof("Start ssh server on %s", s.sshServer.Addr)

Callers 1

exitWithErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected