Require standard output to be a terminal.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_need_tty

Purpose

Require standard output to be a terminal.

Side effects

Prints an error to stderr when no stdout TTY is attached.

Returns

  • 0 if stdout is a TTY; 1 otherwise.

Usage

  sgnd_need_tty