• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aspectran / aspectran / #4657

15 Oct 2025 08:00AM UTC coverage: 36.225% (-0.02%) from 36.244%
#4657

push

github

topframe
feat(shell): Improve quit command in non-interactive mode

The 'quit' command was not suitable for scripted or piped execution. It would hang at the confirmation prompt, assuming an interactive user was present.

This commit introduces non-interactive mode awareness to the shell, leading to the following improvements for the 'quit' command:

- In non-interactive sessions (e.g., `echo "quit" | shell.bat`), the command now executes without a confirmation prompt.
- The "Bye." exit message is now suppressed in non-interactive mode for a cleaner, script-friendly output.

To achieve this, an `isInteractive()` method has been added to the `ShellConsole` interface, with distinct implementations for `JLineShellConsole` (interactive) and `DefaultShellConsole` (non-interactive).

Additionally, `DefaultShellConsole`'s input handling has been made more robust to prevent potential infinite loops when an input stream is closed.

0 of 13 new or added lines in 5 files covered. (0.0%)

6 existing lines in 1 file now uncovered.

14988 of 41375 relevant lines covered (36.22%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/shell/src/main/java/com/aspectran/shell/command/builtins/QuitCommand.java


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc