Skip to content
Myr

add option to prefer locally installed binaries

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sindre Sorhus · committed by Sindre Sorhus · parent 0ea8aaf · Browse files · 4 files+44 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+44 added−10 removed

  • other:+44 added−10 removed

4 files+44 added−10 removed

modified:index.js+18 added-6 removed
modified:package.json+3 added
modified:readme.md+10 added-1 removed
8 unmodified lines
9- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`.10- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform.11- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn-async#why)12- Higher max buffer. 10 MB instead of 200 KB.13- [Executes locally installed binaries by name.](#preferlocal)141516## Install17
58 unmodified lines
76Additional exposed options:7778#### stripEof7979Type: `boolean` 80Type: `boolean`<br>81Default: `true`8283[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output.8485#### preferLocal8687Type: `boolean`<br>88Default: `true`8990Prefer locally installed binaries when looking for a binary to execute.<br>91If you `$ npm install foo`, you can then `execa('foo')`.929394## License9596MIT © [Sindre Sorhus](http://sindresorhus.com)
modified:test.js+13 added-3 removed