Skip to content

Commit

Permalink
add --no-summary option
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaDiachenko committed Jun 21, 2024
1 parent 54d1689 commit 3fd1639
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/cli/src/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ export const logRaw = (...args: Array<string>) => {
export const logSummary = (opts?: { header?: string; headerStyle?: 'success' | 'warning' | 'error' | 'none' }) => {
const ctx = getContext();
if (ctx.program?.opts().help) return;

if (_jsonOnly) return;
if (_jsonOnly || ctx.program?.opts().noSummary) return;

if (ctx.paths.project.configExists && !ctx.paths.IS_NPX_MODE && !ctx.paths.IS_LINKED) {
logAndSave(chalk().yellow('You are trying to run global rnv command in your current project.'), true);
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/tasks/taskOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const RnvTaskOptions = createTaskOptionsMap([
altKey: 'printExec',
description: 'Print exec commands in full',
},
{ key: 'no-summary', altKey: 'noSummary', description: 'Omit summary box in output' },
{
key: 'platform',
shortcut: 'p',
Expand Down Expand Up @@ -228,6 +229,7 @@ export const RnvTaskCoreOptionPresets = createTaskOptionsPreset({
RnvTaskOptions.printExec,
RnvTaskOptions.telemetryDebug,
RnvTaskOptions.json,
RnvTaskOptions.noSummary,
],
});

Expand Down

0 comments on commit 3fd1639

Please sign in to comment.