MCPcopy Index your code
hub / github.com/QwikDev/qwik / run

Function run

scripts/util.ts:266–284  ·  view source on GitHub ↗
(
  cmd: string,
  args: string[],
  skipExecution?: boolean,
  dryRunCliFlag?: boolean,
  opts?: Options
)

Source from the content-addressed store, hash-verified

264}
265
266export async function run(
267 cmd: string,
268 args: string[],
269 skipExecution?: boolean,
270 dryRunCliFlag?: boolean,
271 opts?: Options
272) {
273 if (dryRunCliFlag) {
274 args = [...args, '--dry-run'];
275 }
276 const bash = ` ${cmd} ${args.join(' ')}`;
277 console.log(bash, opts ? JSON.stringify(opts) : '');
278 if (!skipExecution) {
279 const result = await execa(cmd, args, opts);
280 if (result.failed) {
281 panic(`Finished with error: ${bash}`);
282 }
283 }
284}
285
286export function panic(msg: string | Error) {
287 const err = typeof msg === 'string' ? new Error(msg) : msg;

Callers 4

publishEslintFunction · 0.90
publishCreateQwikCliFunction · 0.90
publishFunction · 0.90

Calls 2

panicFunction · 0.70
joinMethod · 0.65

Tested by

no test coverage detected