diff --git a/src/apps/debugger/controllers/TeamDebugger.cpp b/src/apps/debugger/controllers/TeamDebugger.cpp
index 3226afa..b2118b9 100644
a
|
b
|
TeamDebugger::_HandleTeamDeleted(TeamDeletedEvent* event)
|
1380 | 1380 | message, "Do nothing", "Quit", fCommandLineArgc != 0 |
1381 | 1381 | ? "Restart team" : NULL); |
1382 | 1382 | |
1383 | | if (result == 1) |
| 1383 | if (result == 1 || result == -1) |
1384 | 1384 | PostMessage(B_QUIT_REQUESTED); |
1385 | 1385 | else if (result == 2) { |
1386 | 1386 | _SaveSettings(); |
diff --git a/src/apps/debugger/user_interface/cli/commands/CliQuitCommand.cpp b/src/apps/debugger/user_interface/cli/commands/CliQuitCommand.cpp
index def9368..d01ce0a 100644
a
|
b
|
CliQuitCommand::Execute(int argc, const char* const* argv, CliContext& context)
|
27 | 27 | printf("Kill or resume the debugged team?\n"); |
28 | 28 | for (;;) { |
29 | 29 | const char* line = context.PromptUser("(k)ill, (r)esume, (c)ancel? "); |
30 | | if (line == NULL) |
31 | | return; |
| 30 | if (line == NULL) { |
| 31 | // Failure to read from the standard input likely means it is |
| 32 | // already gone. This allows using the CLI in non-interactive mode: |
| 33 | // echo -e "save-report\nq"|Debugger -c --team nnn |
| 34 | line = "r"; |
| 35 | } |
32 | 36 | |
33 | 37 | BString trimmedLine(line); |
34 | 38 | trimmedLine.Trim(); |