-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Support for double angle bracket >> #1164
Comments
Hi @TimCreasman, Execa does not use shells, so it does not use shell-specific syntax like That being said, we do try to emulate shell features. In this case, this would be appending to a file. You can achieve this by doing: await execa(..., {stdout: [createWriteStream('output.txt', {flags: 'a'}), 'pipe']}) Now, that's a little verbose, so we could maybe add the following syntax instead: await execa(..., {stdout: {file: 'output.txt', append: true}}) What do you think @sindresorhus? |
Full disclosure, I did not understand that so thanks for the clarification. I see now this project essentially wraps node's And thanks for the example! The second syntax example would be very nice but its good knowing the functionality is already easily available and not crazy verbose. |
👍 |
Done at #1166. |
Published in |
Hello!
Apologies if I missed this in the documentation or the closed issues, but is there support for the
>>
redirection operator?From my understanding, the single
>
bracket is essentially supported via theexeca({stdout: {file: 'output.txt'}})
syntax but I couldn't find anything referencing>>
.>>
is supposed to append the stdout to a file so maybe a syntax likeexeca({stdout: {append: 'output.txt'}})
would make sense?The text was updated successfully, but these errors were encountered: