script.js
This file
Path
lib/methods/script.js
15 lines · 644 bytes · JavaScript
Last changed by
Rename files (#977)ehmickybefore adoption4b2e316
History of this fileTake it
12345678910111213141516export const setScriptSync = (boundExeca, createNested, boundOptions) => { boundExeca.sync = createNested(mapScriptSync, boundOptions); boundExeca.s = boundExeca.sync;};
export const mapScriptAsync = ({options}) => getScriptOptions(options);const mapScriptSync = ({options}) => ({...getScriptOptions(options), isSync: true});
const getScriptOptions = options => ({options: {...getScriptStdinOption(options), ...options}});
const getScriptStdinOption = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined ? {stdin: 'inherit'} : {};
export const deepScriptOptions = {preferLocal: true};