ci / test (pull_request) Successful in 1m2s
`--key -` and `--token -` read a line of standard input with no prompt, so `inbuxa upgrade --key -` looked stuck. On a terminal it now prints "API key (paste it and press Enter): " to stderr and doesn't echo what's pasted. Piped input is read as before. One helper, readSecret, now reads it for install/upgrade, join, certs, dns --refresh and relay --token, instead of three copies of the read.
27 lines
766 B
Go
27 lines
766 B
Go
// SPDX-FileCopyrightText: 2026 Coffey Labs LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
//go:build !linux
|
|
|
|
package tui
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
// The installer runs on Linux only (main says so before anything else), but
|
|
// it compiles everywhere; these keep it compiling.
|
|
|
|
func rawMode(*os.File) (func(), error) { return nil, errors.New("not a Linux terminal") }
|
|
func size(*os.File) (int, int) { return 80, 24 }
|
|
|
|
// NoEcho is never reached off Linux, where nothing is a terminal.
|
|
func NoEcho(*os.File) (func(), error) { return nil, errors.New("not a Linux terminal") }
|
|
|
|
// IsTerminal is false off Linux: the interface is never started there.
|
|
func IsTerminal(*os.File) bool { return false }
|
|
|
|
var resizeSignal os.Signal = syscall.SIGINT
|