nested-pipe-verbose.js
This file
Path
test/fixtures/nested-pipe-verbose.js
21 lines · 604 bytes · JavaScript
Last changed by
Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348
History of this fileTake it
Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348
lines 1–21why, one step back1#!/usr/bin/env node2import {execa, getOneMessage, sendMessage} from '../../index.js';3import {getNestedOptions} from '../helpers/nested.js';45const {6 file,7 commandArguments = [],8 options: {destinationFile, destinationArguments, ...options},9 optionsFixture,10 optionsInput,11} = await getOneMessage();1213const commandOptions = await getNestedOptions(options, optionsFixture, optionsInput);1415try {16 const result = await execa(file, commandArguments, commandOptions)17 .pipe(destinationFile, destinationArguments, commandOptions);18 await sendMessage(result);19} catch (error) {20 await sendMessage(error);21}