mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-20 06:05:16 +00:00
Better error message
This commit is contained in:
parent
ed9391d4d6
commit
aaffec1cbc
1 changed files with 4 additions and 1 deletions
|
|
@ -93,7 +93,10 @@ def main(args: List[str]) -> NoReturn:
|
|||
data: Optional[bytes] = None
|
||||
if not sys.stdin.isatty():
|
||||
data = sys.stdin.buffer.read()
|
||||
sys.stdin = open(os.ctermid())
|
||||
try:
|
||||
sys.stdin = open(os.ctermid())
|
||||
except FileNotFoundError:
|
||||
raise SystemExit('Not connected to a controlling terminal device, no /dev/tty')
|
||||
loop = Loop()
|
||||
handler = Clipboard(data, cli_opts)
|
||||
loop.loop(handler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue