-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with input option and absolute path without execute permissions #166
Comments
@IssueHunt has funded $30.00 to this issue.
|
@targos Do you remember detailed environments? Like Node.js/OS/execa version. I failed to reproduce with Node8&10/OSX 10.14/execa 1.0.0. It throws an error during |
Node.js 11.12.0 / Linux (Fedora 29) / execa 1.0.0. I just realized now that this only happens when the path to the file is absolute (it can be located anywhere). |
I can reproduce: $ touch test.sh
$ ls -l test.sh
-rw-r--r-- 1 ether ether 0 Mar 21 16:06 test.sh Then: const execa = require('execa')
execa('./test.sh', { input: 'foo' }) Output: Thrown:
TypeError: Cannot read property 'end' of undefined
at handleInput (/home/ehmicky/Desktop/execa/index.js:114:17)
at execa (/home/ehmicky/Desktop/execa/index.js:387:2) I am using the latest |
Actually, it's not only when the path is absolute: |
It's a change in Node 10+. I have submitted an issue, nodejs/node#26852. Let's waiting for response. And should we add a simple check for |
PR #212 implements that simple check. |
@sindresorhus has rewarded $27.00 to @stroncium. See it on IssueHunt
|
To reproduce, create
/non-executable-file
and don't give it execute permissions.It crashes here because
stdin
doesn't exist:execa/index.js
Line 92 in bfc9a4e
The text was updated successfully, but these errors were encountered: