Skip to content

setup-hermes.sh should guard interactive prompts in non-interactive environments #17579

@zerowill111

Description

@zerowill111

Summary

setup-hermes.sh currently assumes interactive stdin for optional prompts. When run from CI, Dev Containers, cloud bootstrap scripts, or any non-interactive shell, the bare read -p prompts can return EOF under set -e and make setup exit with a failure status.

Evidence

In setup-hermes.sh:

  • The script starts with set -e.
  • The optional ripgrep prompt uses read -p "Install ripgrep for faster search? [Y/n] " -n 1 -r.
  • The final setup prompt uses read -p "Would you like to run the setup wizard now? [Y/n] " -n 1 -r.

The main installer (scripts/install.sh) already has defensive handling for this case via interactive checks and /dev/tty probing, so this would make the developer setup path consistent.

Expected behavior

If no interactive terminal is available, the script should skip optional prompts and print the manual follow-up command, for example Run 'hermes setup' after install.

Suggested fix

Port the prompt helper from scripts/install.sh, or guard both prompt sites with a TTY check. Reads should also be non-fatal, e.g. read ... || REPLY="n".

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/cliCLI entry point, hermes_cli/, setup wizardtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions