Skip to content

Commit

Permalink
fix(rosetta): diagnostics not showing (#3182)
Browse files Browse the repository at this point in the history
One-liner to make sure that we slice `diags` correctly. Tested locally on my own machine to ensure that it works.

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
kaizencc committed Nov 18, 2021
1 parent ace0b83 commit 92a7d5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jsii-rosetta/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function printDiagnostics(diags: readonly RosettaDiagnostic[], stream: No
// Don't print too much, at some point it just clogs up the log
const maxDiags = 50;

for (const diag of diags.slice(maxDiags)) {
for (const diag of diags.slice(0, maxDiags)) {
stream.write(diag.formattedMessage);
}

Expand Down

0 comments on commit 92a7d5e

Please sign in to comment.