1 | "use strict";
|
2 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
3 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
4 | };
|
5 | Object.defineProperty(exports, "__esModule", { value: true });
|
6 | const logger_1 = require("@expo/logger");
|
7 | const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
|
8 | async 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 | }
|
23 | exports.default = spawn;
|
24 |
|
\ | No newline at end of file |