Skip to content

Commit

Permalink
Update tools/cli-client/internals/cli/cli_main.go
Browse files Browse the repository at this point in the history
Co-authored-by: Linostar <[email protected]>
  • Loading branch information
zhijie-yang and linostar authored Sep 20, 2024
1 parent 82ae552 commit 6e11b0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/cli-client/internals/cli/cli_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func addHelp(p *flags.Parser) {
func blockForConfirm(s string) error {
// check if is a tty
fi, err := os.Stdin.Stat()
if err != nil && fi.Mode()&os.ModeNamedPipe == 1 {
if err != nil && fi.Mode()&os.ModeNamedPipe != 0 {
return fmt.Errorf("non-interactive terminal detected, run with -y option")
} else if err != nil {
return err
Expand Down

0 comments on commit 6e11b0b

Please sign in to comment.