Homec4science

Convert unreadable stdin into a catchable exception rather than failing…

Authored by epriestley <git@epriestley.com> on Aug 23 2011, 01:38.

Description

Convert unreadable stdin into a catchable exception rather than failing ambiguously

Summary: See T445, if you "echo derp | arc paste" and it tries to prompt you we
currently drop you into a spiral of fail. Instead, throw. Applications can
choose to catch this exception and select a default if they want to continue.

Test Plan:
$ echo 'derp' | arc paste

    File permissions on your ~/.arcrc are too open. Fix them by chmod'ing to
    600? [Y/n]
Exception:
The program is attempting to read user input, but stdin is being piped from

some other source (not a TTY).

(Run with --trace for a full exception trace.)

Reviewers: codeblock, aran, jungejason, tuomaspelkonen

Reviewed By: codeblock

CC: aran, codeblock

Differential Revision: 847

Details

Committed
epriestley <git@epriestley.com>Aug 23 2011, 01:50
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU45cd0d004f2e: Fix XHPAST handling of multiple-line tokens
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU79a83c314251: Convert unreadable stdin into a catchable exception rather than failing… (authored by epriestley <git@epriestley.com>).Aug 23 2011, 01:50