Something went wrong. Try again.
WIP restic wrapper
Something went wrong. Try again.
12345678910111213141516171819202122232425262728// SPDX-FileCopyrightText: Amolith <amolith@secluded.site>//// SPDX-License-Identifier: LicenseRef-MutuaL-1.2
package cmd
import ( "os"
"github.com/charmbracelet/x/term")
// isStdinTerminal is a package-level variable so tests can override it.// Production code uses term.IsTerminal(os.Stdin.Fd()).var isStdinTerminal = func() bool { return term.IsTerminal(os.Stdin.Fd())}
// isInteractive reports whether keld should launch its TUI.// It returns false when stdin is not a terminal or when// KELD_NONINTERACTIVE is set to a non-empty value.func isInteractive() bool { if os.Getenv("KELD_NONINTERACTIVE") != "" { return false } return isStdinTerminal()}