UNPKG

806 BJavaScriptView Raw
1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6const logger_1 = require("@expo/logger");
7const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
8async function spawn(command, args, _options = {
9 stdio: 'inherit',
10 cwd: process.cwd(),
11}) {
12 const options = { ..._options };
13 const { logger } = options;
14 if (logger) {
15 options.stdio = 'pipe';
16 }
17 const promise = spawn_async_1.default(command, args, options);
18 if (logger && promise.child) {
19 logger_1.pipeSpawnOutput(logger, promise.child, options);
20 }
21 return promise;
22}
23exports.default = spawn;
24//# sourceMappingURL=index.js.map
\No newline at end of file