nested-input.js
This file
Path
test/fixtures/nested-input.js
12 lines · 453 bytes · JavaScript
Last changed by
Upgrade xo (#980)ehmickybefore adoptionccfa412
History of this fileTake it
12345678910111213#!/usr/bin/env nodeimport process from 'node:process';import {execa, execaSync} from '../../index.js';import {foobarUtf16Uint8Array} from '../helpers/input.js';
const [optionsString, file, isSync, ...commandArguments] = process.argv.slice(2);const options = {...JSON.parse(optionsString), input: foobarUtf16Uint8Array};if (isSync === 'true') { execaSync(file, commandArguments, options);} else { await execa(file, commandArguments, options);}