Skip to content

Commit

Permalink
fix: Make stdinIsATTY return false if --no-tty is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Oct 29, 2023
1 parent 294c2c8 commit 797e3cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/cmd/inittemplatefuncs.go
Expand Up @@ -13,6 +13,9 @@ func (c *Config) exitInitTemplateFunc(code int) string {
}

func (c *Config) stdinIsATTYInitTemplateFunc() bool {
if c.noTTY {
return false
}
file, ok := c.stdin.(*os.File)
if !ok {
return false
Expand Down

0 comments on commit 797e3cf

Please sign in to comment.