Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of LoggingRenderer after bad merge #845

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions node-src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { v4 as uuid } from 'uuid';
import { getBranch, getCommit, getSlug, getUncommittedHash, getUserEmail } from './git/git';
import GraphQLClient from './io/GraphQLClient';
import HTTPClient from './io/HTTPClient';
import LoggingRenderer from './lib/LoggingRenderer';
import NonTTYRenderer from './lib/NonTTYRenderer';
import checkForUpdates from './lib/checkForUpdates';
import checkPackageJson from './lib/checkPackageJson';
Expand Down Expand Up @@ -136,6 +137,7 @@ export async function run({
export async function runAll(ctx: InitialContext) {
ctx.log.info('');
ctx.log.info(intro(ctx));
ctx.log.info('');

const onError = (e: Error | Error[]) => {
ctx.log.info('');
Expand Down Expand Up @@ -188,9 +190,16 @@ export async function runAll(ctx: InitialContext) {
async function runBuild(ctx: Context) {
try {
try {
ctx.log.info('');
if (ctx.options.interactive) ctx.log.queue(); // queue up any log messages while Listr is running
const options = ctx.options.interactive ? {} : { renderer: NonTTYRenderer, log: ctx.log };
const options = {
log: ctx.log,
renderer: NonTTYRenderer,
};
if (ctx.options.interactive) {
// Use an enhanced version of Listr's default renderer, which also logs to a file
options.renderer = LoggingRenderer;
// Queue up any non-Listr log messages while Listr is running
ctx.log.queue();
}
await new Listr(getTasks(ctx.options), options).run(ctx);
} catch (err) {
endActivity(ctx);
Expand Down
111 changes: 0 additions & 111 deletions node-src/runBuild.ts

This file was deleted.

Loading