tektoncd / tektoncd/cli

`tkn` should not be interactive if we are not running with a tty

Open
#571 12 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
Go
Stars
461
Forks
277
Avg merge
16h 48m
Merged PRs (30d)
95

Description

#Expected Behavior

Don't try interactiveness if we don't run interactively (ie in scripts or others), for example on tkn pipelinerun logs just fail if no argument is specified

Actual Behavior

Do some interactiveness stuff with survey

Steps to Reproduce the Problem

  1. Write a shell script that do a tkn pipelinerun logs
  2. Should not be interactive

Additional Info

That should detect a terminal or not https://github.com/mattn/go-isatty/

/kind bug

Contributor guide

Open the contributing guide

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.

Research direction

Start at the tkn pipelinerun logs entry point and trace where survey is invoked. Review the linked mattn/go-isatty reference for terminal detection. Done means a non-TTY invocation does not prompt and tkn pipelinerun logs fails when no argument is supplied.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.