Skip to content

Commit

Permalink
fix: redirect ora output to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Mar 12, 2021
1 parent bdbe589 commit fd209c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/snyk-fix/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function fix(
meta: { fixed: number; failed: number };
fixSummary: string;
}> {
const spinner = ora({ isSilent: options.quiet });
const spinner = ora({ isSilent: options.quiet, stream: process.stdout });
let resultsByPlugin: FixHandlerResultByPlugin = {};
const entitiesPerType = groupEntitiesPerScanType(entities);
const exceptionsByScanType: ErrorsByEcoSystem = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export async function showResultsSummary(
resultsByPlugin,
exceptionsByScanType,
);
return `${successfulFixesSummary}\n\n${unresolvedSummary}\n\n${overallSummary}`;
return `${successfulFixesSummary}${
unresolvedSummary ? `\n\n${unresolvedSummary}` : ''
}\n\n${overallSummary}`;
}

export function generateSuccessfulFixesSummary(
Expand Down
2 changes: 1 addition & 1 deletion packages/snyk-fix/src/plugins/python/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function pythonFix(
entities: EntityToFix[],
options: FixOptions,
): Promise<FixHandlerResultByPlugin> {
const spinner = ora({ isSilent: options.quiet });
const spinner = ora({ isSilent: options.quiet, stream: process.stdout });
spinner.text = 'Looking for supported Python items';
spinner.start();
const pluginId = 'python';
Expand Down

0 comments on commit fd209c9

Please sign in to comment.