Interactive prompt appears when tty not attached

Open
#480 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Reproduce the issue with rm -f ~/.lagoon.yml followed by lagoon bash completion > /tmp/completion.sh. Trace the CLI's config-file prompt and bash-completion entry point; done means completion exits without hanging or requiring a config file, while prompts remain limited to interactive terminals.

Written by the indexing model from the issue text.

Description

Describe the bug
Lagoon CLI always prompts interactively to create a config file even when it is not running in an interactive terminal.

To Reproduce
Steps to reproduce the behavior:

  1. rm -f ~/.lagoon.yml
  2. lagoon bash completion > /tmp/completion.sh
  3. Command hangs

Expected behavior
Prompt should not appear unless the terminal is interactive. Also bash completion should not require a config file.

Screenshots
n/a

Desktop (please complete the following information):

  • OS: Debian testing

Additional context
n/a

Dominant language
Go
Stars
28
Forks
14
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uselagoon/lagoon-cli

All issues in uselagoon/lagoon-cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.