You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(cli): stack/security diff no longer prints directly to a stream (#264)
part of https://github.com/orgs/aws/projects/257
this refactor removes direct prints to `stderr` or `stdout` for the diff
cli command. the diff result will instead be printed through the global
`CliIoHost`.
the diff format is determined by the `Formatter` class, which takes in a
`stream` that previously was `stdout` (or `stderr`). now, we are sending
our own stream into `Formatter`, capturing what was previously
immediately printed and instead returning it as a string. we then print
the resulting string through `CliIoHost`. it should have no functional
change to how the diff cli works today.
this effort will help support diff in the toolkit lib because it allows
the `IoHost` governance of the diff print.
as this is a pure refactor, successful existing tests is enough to
ensure that this works.
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license
'Hold on while we create a read-only change set to get a diff with accurate replacement information (use --no-change-set to use a less accurate but faster template-only diff)\n',
229
-
);
228
+
));
230
229
231
230
returnawaitcreateChangeSet(ioHelper,{
232
231
cfn,
@@ -242,9 +241,9 @@ async function uploadBodyParameterAndCreateChangeSet(
`Checking if the stack ${stack.stackName} exists before creating the changeset has failed, will base the diff on template differences (run again with -v to see the reason)\n`,
0 commit comments