Polyman Documentation - v3.0.0
    Preparing search index...

    Function stdinIsInteractive

    • Whether stdin is an interactive terminal, i.e. a prompt could be answered. Headless agents and CI pipelines get false; commands must not block on a prompt in that case.

      Returns boolean

      True when stdin is a TTY

      if (!stdinIsInteractive()) {
      throw new Error('pass --yes to skip the confirmation');
      }