steelbrain / exec

Node's Process spawning APIs beautified
MIT License
9 stars 4 forks source link

options.timeout need the default value written to config #101

Open leagris opened 4 years ago

leagris commented 4 years ago

Issue details

When options.timeout is not set, some commands times-out with:

[Linter] Error running ShellCheck Error: Process execution timed out
    at /home/username/.atom/packages/linter-shellcheck/node_modules/sb-exec/lib/index.js:89

Expected behavior

When options.timeout is not set:

Notes

The MDN/WindowOrWorkerGlobalScope.setTimeout(), Parameters documentations says that the default value is 0 milliseconds:

delay Optional

The time, in milliseconds (thousandths of a second), the timer should wait before the specified function or code is executed. __If this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle___. Note that in either case, the actual delay may be longer than intended; see Reasons for delays longer than specified below.

Related issues

steelbrain commented 4 years ago

https://github.com/steelbrain/exec/blob/48910bbba76495bab2418edbebc0f9389a56867e/src/helpers.js#L26

We fill out the default options.timeout if not specified