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

Safeguard for charmbracelet/bubbletea#964 prevents using regular stdin #168

Closed
cardil opened this issue Mar 27, 2024 · 0 comments · Fixed by #170
Closed

Safeguard for charmbracelet/bubbletea#964 prevents using regular stdin #168

cardil opened this issue Mar 27, 2024 · 0 comments · Fixed by #170
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@cardil
Copy link
Contributor

cardil commented Mar 27, 2024

The following block prevents from using regular stdin with tui.Spinner and tui.Progress:

if !st.Mode().IsRegular() {
if st.Name() != os.DevNull {
log.Println("WARN: non-regular file given as input: ",
st.Name(), " (mode: ", st.Mode(),
"). Using `nil` as input.")
}
return nil
}

The following situation happens:

$ go run github.com/cardil/repro-kn-cli-bad-license@latest
2024/03/27 11:37:43 WARN: non-regular file given as input:  stdin  (mode:  Dcrw--w---- ). Using `nil` as input.

/kind bug

@knative-prow knative-prow bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 27, 2024
@cardil cardil self-assigned this Mar 27, 2024
cardil added a commit to cardil/knative-client-pkg that referenced this issue Mar 27, 2024
knative-prow bot pushed a commit that referenced this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant