Skip to content

ConfirmPrompt input issue on dumb terminal #1452

@tlf30

Description

@tlf30

Hello, when using a dumb terminal with the conformation prompt, the user input is taken, but the prompt never completes. It just hangs as if it is still waiting for input.

 // Create a ConsolePrompt with the terminal
        ConsolePrompt prompt = new ConsolePrompt(terminal);

        // Get a PromptBuilder to create UI elements
        PromptBuilder builder = prompt.getPromptBuilder();

        // Create a simple yes/no prompt
        builder.createConfirmPromp()
                .name("prompt")
                .message(message)
                .defaultValue(defaultValue)
                .addPrompt();

        try {
            // Display the prompt and get the result
            Map<String, PromptResultItemIF> result = prompt.prompt(builder.build());
            return (ConfirmResult) result.get("prompt");
        } catch (Exception e) {
            log.error(e);
        }
        return null;

Dumb Terminal:

Image

System Terminal:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions