feat: add -y|--yes flag for 'us deploy' to auto-confirm deployment plan

This commit is contained in:
Pasha Sviderski
2025-09-12 22:52:06 +10:00
parent 8a273dbf63
commit bc078472d4
4 changed files with 46 additions and 43 deletions
+11 -1
View File
@@ -1,6 +1,11 @@
package cli
import "github.com/charmbracelet/huh"
import (
"os"
"github.com/charmbracelet/huh"
"golang.org/x/term"
)
func Confirm() (bool, error) {
var confirmed bool
@@ -21,3 +26,8 @@ func Confirm() (bool, error) {
return confirmed, nil
}
// IsStdinTerminal checks if the standard input is a terminal (TTY).
func IsStdinTerminal() bool {
return term.IsTerminal(int(os.Stdin.Fd()))
}