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

Function IsUnexpectedExitCode

pkg/devspace/services/terminal/terminal.go:237–246  ·  view source on GitHub ↗
(code int)

Source from the content-addressed store, hash-verified

235}
236
237func IsUnexpectedExitCode(code int) bool {
238 // Expected exit codes are (https://shapeshed.com/unix-exit-codes/):
239 // 1 - Catchall for general errors
240 // 2 - Misuse of shell builtins (according to Bash documentation)
241 // 126 - Command invoked cannot execute
242 // 127 - “command not found”
243 // 128 - Invalid argument to exit
244 // 130 - Script terminated by Control-C
245 return code != 0 && code != 1 && code != 2 && code != 126 && code != 127 && code != 128 && code != 130
246}
247
248func getCommand(devContainer *latest.DevContainer) []string {
249 command := devContainer.Terminal.Command

Callers 4

startSSHWithRestartFunction · 0.92
StartAttachFunction · 0.92
StartTerminalFromCMDFunction · 0.85
StartTerminalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected