diff --git a/cli/src/commands/subgraph/commands/publish.ts b/cli/src/commands/subgraph/commands/publish.ts index aa6dca122..331c33ef5 100644 --- a/cli/src/commands/subgraph/commands/publish.ts +++ b/cli/src/commands/subgraph/commands/publish.ts @@ -116,16 +116,16 @@ export default (opts: BaseCommandOptions) => { }, ); - const compositionWarningsTable = new Table({ - head: [ - pc.bold(pc.white('FEDERATED_GRAPH_NAME')), - pc.bold(pc.white('NAMESPACE')), - pc.bold(pc.white('FEATURE_FLAG')), - pc.bold(pc.white('WARNING_MESSAGE')), - ], - colWidths: [30, 30, 30, 120], - wordWrap: true, - }); + const compositionWarningsTable = new Table({ + head: [ + pc.bold(pc.white('FEDERATED_GRAPH_NAME')), + pc.bold(pc.white('NAMESPACE')), + pc.bold(pc.white('FEATURE_FLAG')), + pc.bold(pc.white('WARNING_MESSAGE')), + ], + colWidths: [30, 30, 30, 120], + wordWrap: true, + }); switch (resp.response?.code) { case EnumStatusCode.OK: { @@ -210,7 +210,7 @@ export default (opts: BaseCommandOptions) => { process.exit(1); } } - + if (resp.compositionWarnings.length > 0) { console.log(pc.yellow(`We found composition warnings.\n${pc.bold('Please check the warnings below:')}`)); for (const compositionWarning of resp.compositionWarnings) {