nested.js
This file
Path
test/fixtures/nested.js
28 lines · 575 bytes · JavaScript
Last changed by
Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348
History of this fileTake it
1234567891011121314151617181920212223242526272829#!/usr/bin/env nodeimport { execa, execaSync, getOneMessage, sendMessage,} from '../../index.js';import {getNestedOptions} from '../helpers/nested.js';
const { isSync, file, commandArguments, options, optionsFixture, optionsInput,} = await getOneMessage();
const commandOptions = await getNestedOptions(options, optionsFixture, optionsInput);
try { const result = isSync ? execaSync(file, commandArguments, commandOptions) : await execa(file, commandArguments, commandOptions); await sendMessage(result);} catch (error) { await sendMessage(error);}