Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the sudden exit from the application #8

Open
tomassirio opened this issue Oct 3, 2024 · 2 comments
Open

Fix the sudden exit from the application #8

tomassirio opened this issue Oct 3, 2024 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers Hard help wanted Extra attention is needed

Comments

@tomassirio
Copy link
Owner

The application throws an InterruptedIOException when the user tries to kill the process (ctrl + c) while a command is being executed:

EASY INSTALLER :: >install -m
2024-10-03T09:38:23.509+02:00 ERROR 79055 --- [EasyInstaller] [           main] o.s.boot.SpringApplication               : Application run failed

java.io.IOError: java.io.InterruptedIOException
        at org.jline.keymap.BindingReader.readCharacter(BindingReader.java:169) ~[jline-reader-3.26.2.jar!/:na]
        at org.jline.keymap.BindingReader.readBinding(BindingReader.java:109) ~[jline-reader-3.26.2.jar!/:na]
        at org.jline.keymap.BindingReader.readBinding(BindingReader.java:57) ~[jline-reader-3.26.2.jar!/:na]
        at org.springframework.shell.component.support.AbstractSelectorComponent.read(AbstractSelectorComponent.java:160) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at org.springframework.shell.component.support.AbstractSelectorComponent.read(AbstractSelectorComponent.java:48) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at org.springframework.shell.component.support.AbstractComponent.loop(AbstractComponent.java:288) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at org.springframework.shell.component.SingleItemSelector.runInternal(SingleItemSelector.java:79) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at org.springframework.shell.component.SingleItemSelector.runInternal(SingleItemSelector.java:44) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at org.springframework.shell.component.support.AbstractComponent.run(AbstractComponent.java:155) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at org.springframework.shell.component.flow.ComponentFlow$DefaultComponentFlow.lambda$singleItemSelectorsStream$18(ComponentFlow.java:615) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at org.springframework.shell.component.flow.ComponentFlow$DefaultComponentFlow.runGetResults(ComponentFlow.java:421) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at org.springframework.shell.component.flow.ComponentFlow$DefaultComponentFlow.run(ComponentFlow.java:368) ~[spring-shell-core-3.3.1.jar!/:3.3.1]
        at com.tomassirio.easyinstaller.command.step.PackageManagerStep.execute(PackageManagerStep.kt:33) ~[!/:0.1.0]
        at com.tomassirio.easyinstaller.command.InstallerCommand.installManually(InstallerCommand.kt:35) ~[!/:0.1.0]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
        at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]

A graceful exit using the ShellFormatter would be preferred in these instances

Definition of done: When a user kills the process whilst on a command, the user won't see an exception but a goodbye message

@tomassirio tomassirio added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers Hard labels Oct 3, 2024
@taarh
Copy link

taarh commented Feb 4, 2025

If you’re still having the issue, I’d be happy to help. Feel free to reach out if you need assistance

@tomassirio
Copy link
Owner Author

Hey @taarh! Feel free to give it a try. I'll assign it to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers Hard help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants