Skip to content
Myr

Fix linting errors (#462)

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

authored by ehmicky · committed by GitHub · parent 2f61456 · Browse files · 3 files+14 added−14 removed
This commit

State

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

Diff stats

3 files+14 added−14 removed

  • tests:+10 added−10 removed
  • other:+4 added−4 removed

3 files+14 added−14 removed

modified:lib/stream.js+1 added-1 removed
modified:test/kill.js+10 added-10 removed
136 unmodified lines
137test('spawnAndExit detached', spawnAndExit, false, true);138test('spawnAndExit cleanup detached', spawnAndExit, true, true);139140// When parent process exits before child process141const spawnAndKill = async (t, signal, cleanup, detached, isKilled) => {141const spawnAndKill = async (t, [signal, cleanup, detached, isKilled]) => {142 const subprocess = execa('sub-process', [cleanup, detached], {stdio: ['ignore', 'ignore', 'ignore', 'ipc']});143144 const pid = await pEvent(subprocess, 'message');145 t.true(Number.isInteger(pid));
17 unmodified lines
163// - on Linux subprocesses are never killed regardless of `options.detached`164// With `options.cleanup`, subprocesses are always killed165// - `options.cleanup` with SIGKILL is a noop, since it cannot be handled166const exitIfWindows = process.platform === 'win32';167test('spawnAndKill SIGTERM', spawnAndKill, 'SIGTERM', false, false, exitIfWindows);168test('spawnAndKill SIGKILL', spawnAndKill, 'SIGKILL', false, false, exitIfWindows);169test('spawnAndKill cleanup SIGTERM', spawnAndKill, 'SIGTERM', true, false, true);170test('spawnAndKill cleanup SIGKILL', spawnAndKill, 'SIGKILL', true, false, exitIfWindows);171test('spawnAndKill detached SIGTERM', spawnAndKill, 'SIGTERM', false, true, false);172test('spawnAndKill detached SIGKILL', spawnAndKill, 'SIGKILL', false, true, false);173test('spawnAndKill cleanup detached SIGTERM', spawnAndKill, 'SIGTERM', true, true, false);174test('spawnAndKill cleanup detached SIGKILL', spawnAndKill, 'SIGKILL', true, true, false);167test('spawnAndKill SIGTERM', spawnAndKill, ['SIGTERM', false, false, exitIfWindows]);168test('spawnAndKill SIGKILL', spawnAndKill, ['SIGKILL', false, false, exitIfWindows]);169test('spawnAndKill cleanup SIGTERM', spawnAndKill, ['SIGTERM', true, false, true]);170test('spawnAndKill cleanup SIGKILL', spawnAndKill, ['SIGKILL', true, false, exitIfWindows]);171test('spawnAndKill detached SIGTERM', spawnAndKill, ['SIGTERM', false, true, false]);172test('spawnAndKill detached SIGKILL', spawnAndKill, ['SIGKILL', false, true, false]);173test('spawnAndKill cleanup detached SIGTERM', spawnAndKill, ['SIGTERM', true, true, false]);174test('spawnAndKill cleanup detached SIGKILL', spawnAndKill, ['SIGKILL', true, true, false]);175176// See #128177test('removes exit handler on exit', async t => {178 // FIXME: This relies on `signal-exit` internals178 // @todo this relies on `signal-exit` internals179 const emitter = process.__signal_exit_emitter__;180181 const subprocess = execa('noop');182 const listener = emitter.listeners('exit').pop();
80 unmodified lines
modified:index.js+3 added-3 removed
6 unmodified lines
7const onetime = require('onetime');8const makeError = require('./lib/error');9const normalizeStdio = require('./lib/stdio');10const {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = require('./lib/kill');11const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = require('./lib/stream.js');12const {mergePromise, getSpawnedPromise} = require('./lib/promise.js');13const {joinCommand, parseCommand} = require('./lib/command.js');11const {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = require('./lib/stream');12const {mergePromise, getSpawnedPromise} = require('./lib/promise');13const {joinCommand, parseCommand} = require('./lib/command');1415const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;1617const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {
241 unmodified lines