Skip to content
Myr

Fix `timeout` option validation (#463)

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

authored by ehmicky · committed by GitHub · parent edf28a6 · Browse files · 2 files+10 added−5 removed
This commit

State

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

Diff stats

2 files+10 added−5 removed

  • other:+10 added−5 removed

2 files+10 added−5 removed

modified:lib/kill.js+7 added-4 removed
modified:index.js+3 added-1 removed
5 unmodified lines
6const npmRunPath = require('npm-run-path');7const onetime = require('onetime');8const makeError = require('./lib/error');9const normalizeStdio = require('./lib/stdio');10const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = require('./lib/kill');10const {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} = require('./lib/kill');11const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = require('./lib/stream');12const {mergePromise, getSpawnedPromise} = require('./lib/promise');13const {joinCommand, parseCommand} = require('./lib/command');14
59 unmodified lines
74const execa = (file, args, options) => {75 const parsed = handleArguments(file, args, options);76 const command = joinCommand(file, args);7778 validateTimeout(parsed.options);7980 let spawned;81 try {82 spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);83 } catch (error) {
177 unmodified lines