-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Description
This bug causes the pkl-eval
package to fail when no timeout is specified.
> import {evaluate} from "npm:@pkl-community/pkl-eval"
undefined
> evaluate(`
foo = 1
`, {format: "json"}).then(console.log)
Promise {
<rejected> RangeError [ERR_OUT_OF_RANGE]: The value of "timeout" is out of range. It must be an unsigned integer. Received undefined
We have a validateTimeout
call used for spawnSync
, but a different, buggier path is used for execFile
.
Works in node.js:
var cp = require('child_process');
var ls = cp.execFile('ls', ['-l', '/usr'], { timeout: undefined, encoding : 'utf8' });
Fails in deno:
import cp from "node:child_process";
var ls = cp.execFile('ls', ['-l', '/usr'], { timeout: undefined, encoding : 'utf8' });
Uncaught RangeError [ERR_OUT_OF_RANGE]: The value of "timeout" is out of range. It must be an unsigned integer. Received undefined
at Object.execFile (node:child_process:222:11)
at <anonymous>:1:34