Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
madeline-k authored Jun 15, 2022
1 parent 675c810 commit 1791b0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ async function findV1Stacks(response, cloudformation, region) {
body = YAML.parse(getTemplateResponse.TemplateBody);
}
if (body.Resources.CDKMetadata) {
var buf = Buffer.from(body.Resources.CDKMetadata.Properties.Analytics.split(':').splice(2)[0], 'base64');
const buf = Buffer.from(body.Resources.CDKMetadata.Properties.Analytics.split(':').splice(2)[0], 'base64');
const analyticsString = zlib.gunzipSync(buf).toString();
const majorVersion = analyticsString.slice(0,1);
if (majorVersion === '1') {
console.log(`${region}: name: ${stack.StackName} id: ${stack.StackId}`);
}
}
});
}
}

0 comments on commit 1791b0e

Please sign in to comment.