Skip to content
Myr

Fix XO linting (#141)

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

authored by Jakob Krigovsky · committed by Sindre Sorhus · parent 7e4d44c · Browse files · 1 file+10 added−16 removed
This commit

State

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

Diff stats

1 file+10 added−16 removed

  • other:+10 added−16 removed

1 file+10 added−16 removed

modified:index.js+10 added-16 removed
74 unmodified lines
75 parsed76 };77}7879function handleInput(spawned, opts) {80 const input = opts.input;8179function handleInput(spawned, input) {80 if (input === null || input === undefined) {81 return;82 }83
56 unmodified lines
140 });141}142143function makeError(result, options) {146 const stdout = result.stdout;147 const stderr = result.stderr;144 const {stdout, stderr} = result;145146 let err = result.error;150 const code = result.code;151 const signal = result.signal;147 const {code, signal} = result;148153 const parsed = options.parsed;154 const joinedCmd = options.joinedCmd;149 const {parsed, joinedCmd} = options;150 const timedOut = options.timedOut || false;151152 if (!err) {153 let output = '';
35 unmodified lines
189}190191module.exports = (cmd, args, opts) => {192 const parsed = handleArgs(cmd, args, opts);198 const encoding = parsed.opts.encoding;199 const maxBuffer = parsed.opts.maxBuffer;193 const {encoding, maxBuffer} = parsed.opts;194 const joinedCmd = joinCmd(cmd, args);195196 let spawned;197 try {
101 unmodified lines
299 }), destroy);300301 crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);302309 handleInput(spawned, parsed.opts);303 handleInput(spawned, parsed.opts.input);304305 spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected);306 spawned.catch = onrejected => handlePromise().catch(onrejected);307308 return spawned;309};310317module.exports.stdout = function () {311module.exports.stdout = function (...args) {312 // TODO: set `stderr: 'ignore'` when that option is implemented319 return module.exports.apply(null, arguments).then(x => x.stdout);313 return module.exports(...args).then(x => x.stdout);314};315322module.exports.stderr = function () {316module.exports.stderr = function (...args) {317 // TODO: set `stdout: 'ignore'` when that option is implemented324 return module.exports.apply(null, arguments).then(x => x.stderr);318 return module.exports(...args).then(x => x.stderr);319};320321module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts);322
38 unmodified lines