UNPKG

@storm-software/config-tools

Version:

⚡The Storm-Ops monorepo contains utility applications, tools, and various libraries to create modern and scalable web applications.

43 lines (35 loc) 1.34 kB
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs'); // src/utilities/run.ts var _child_process = require('child_process'); var LARGE_BUFFER = 1024 * 1e6; var run = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), stdio = "inherit", env = process.env) => { return _child_process.execSync.call(void 0, command, { cwd, env: { ...process.env, ...env, CLICOLOR: "true", FORCE_COLOR: "true" }, windowsHide: true, stdio, maxBuffer: LARGE_BUFFER, killSignal: "SIGTERM" }); }, "run"); var runAsync = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (config, command, cwd = _nullishCoalesce(config.workspaceRoot, () => ( process.cwd())), env = process.env) => { return _child_process.exec.call(void 0, command, { cwd, env: { ...process.env, ...env, CLICOLOR: "true", FORCE_COLOR: "true" }, windowsHide: true, maxBuffer: LARGE_BUFFER, killSignal: "SIGTERM" }); }, "runAsync"); exports.LARGE_BUFFER = LARGE_BUFFER; exports.run = run; exports.runAsync = runAsync;