(code int)
| 235 | } |
| 236 | |
| 237 | func 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 | |
| 248 | func getCommand(devContainer *latest.DevContainer) []string { |
| 249 | command := devContainer.Terminal.Command |
no outgoing calls
no test coverage detected