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

Support BOSH_TTY environment variable for --tty flag #665

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/completion/completion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var globalFlags = []string{
"-n\tDon't ask for user input, env: BOSH_NON_INTERACTIVE",
"--parallel\tThe max number of parallel operations",
"--sha2\tUse SHA256 checksums, env: BOSH_SHA2",
"--tty\tForce TTY-like output",
"--tty\tForce TTY-like output, env: BOSH_TTY",
"--version\tShow CLI version",
"-v\tShow CLI version",
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/opts/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type BoshOpts struct {
// Output formatting
ColumnOpt []ColumnOpt `long:"column" description:"Filter to show only given column(s), use the --column flag for each column you wish to include"`
JSONOpt bool `long:"json" description:"Output as JSON"`
TTYOpt bool `long:"tty" description:"Force TTY-like output"`
TTYOpt bool `long:"tty" description:"Force TTY-like output" env:"BOSH_TTY"`
NoColorOpt bool `long:"no-color" description:"Toggle colorized output"`
NonInteractiveOpt bool `long:"non-interactive" short:"n" description:"Don't ask for user input" env:"BOSH_NON_INTERACTIVE"`

Expand Down
2 changes: 1 addition & 1 deletion cmd/opts/opts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ var _ = Describe("Opts", func() {
Describe("TTYOpt", func() {
It("contains desired values", func() {
Expect(getStructTagForName("TTYOpt", opts)).To(Equal(
`long:"tty" description:"Force TTY-like output"`,
`long:"tty" description:"Force TTY-like output" env:"BOSH_TTY"`,
))
})
})
Expand Down