age
age copied to clipboard
Issue when using emacs eshell ($TERM dumb)
Environment
- OS: MacOS
- age version: Built from source
What were you trying to do
In an emacs eshell, I typed
./age -p LICENSE > out.age
What happened
There was no prompt for password. No errors. When I opened out.age, it reads Error: refusing to output binary to the terminal. Did you mean to use -a/--armor? Force with "-o -". [ Did age not do what you expected? Could an error be more useful? Tell us: https://filippo.io/age/report ]
echo $TERM dumb
Note: emacs has 2 shells. ESC-x shell and ESC-x eshell
I don't see this problem on shell, only on eshell, if that helps.
<insert terminal transcript here>
This would be a issue in: https://godoc.org/golang.org/x/crypto/ssh/terminal#IsTerminal I strongly suspect
It looks like IsTerminal reports correctly; tty(1) reports not a tty
from emacs' eshell.
eshell does not "communicate with a terminal like most command shells", other commands that depend on tty functions may also fail but some workarounds have been made.
Additionally, redirection via >
in eshell behaves differently, which is what's causing the error to be written to the file.