cdk-real-drift 0.2.54 → 0.2.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -12447,6 +12447,7 @@ async function runRecord(args) {
12447
12447
  return 0;
12448
12448
  }
12449
12449
  let worst = 0;
12450
+ let wroteAny = false;
12450
12451
  const showProgress = !a.json && isInteractive();
12451
12452
  for (const [idx, { stackName, region, template }] of stacks.entries()) {
12452
12453
  if (!region) {
@@ -12456,7 +12457,7 @@ async function runRecord(args) {
12456
12457
  }
12457
12458
  try {
12458
12459
  const { desired, findings } = await gatherWithProgress(showProgress, progressLabel(idx, stacks.length, stackName, region), () => gatherFindings(stackName, region, void 0, template));
12459
- if ((await recordStack({
12460
+ const result = await recordStack({
12460
12461
  stackName,
12461
12462
  region,
12462
12463
  desired,
@@ -12468,7 +12469,9 @@ async function runRecord(args) {
12468
12469
  yes: a.yes,
12469
12470
  interactive: isInteractive(),
12470
12471
  expandNested: a.verbose
12471
- })).refused) worst = Math.max(worst, 2);
12472
+ });
12473
+ if (result.refused) worst = Math.max(worst, 2);
12474
+ if (result.wrote) wroteAny = true;
12472
12475
  } catch (e) {
12473
12476
  if (isStackNotDeployed(e)) {
12474
12477
  console.error(`note: ${stackName}: not deployed yet — nothing to record`);
@@ -12482,7 +12485,7 @@ async function runRecord(args) {
12482
12485
  worst = Math.max(worst, 2);
12483
12486
  }
12484
12487
  }
12485
- if (worst === 0) console.log("commit the baseline file(s) so drift is detected against them going forward.");
12488
+ if (worst === 0 && wroteAny) console.log("commit the baseline file(s) so drift is detected against them going forward.");
12486
12489
  return worst;
12487
12490
  }
12488
12491