Skip to content

Commit

Permalink
fix: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
akshbhu committed Nov 8, 2021
1 parent 3c4616a commit 0567705
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export async function transformResourceWithOverrides(context: $TSContext, resour
if (resource) {
const { transformCategoryStack } = await import(`@aws-amplify/amplify-category-${resource.category}`);
if (transformCategoryStack) {
return transformCategoryStack(context, resource);
return await transformCategoryStack(context, resource);
} else {
printer.info('Overrides functionality is not impleented for this category');
}
} else {
if (FeatureFlags.getBoolean('overrides.project')) {
storeRootStackTemplate(context);
await storeRootStackTemplate(context);
}
}
} catch (err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export async function run(context: $TSContext, resourceDefinition: $TSObject, re
try {
await updateCloudFormationNestedStack(context, nestedStack, resourcesToBeCreated, resourcesToBeUpdated);
if (FeatureFlags.getBoolean('Overrides.project')) {
storeRootStackTemplate(context, nestedStack);
await storeRootStackTemplate(context, nestedStack);
// if the only root stack updates, function is called with empty resources . this fn copies amplifyMeta and backend Config to #current-cloud-backend
context.amplify.updateamplifyMetaAfterPush([]);
}
Expand Down Expand Up @@ -711,7 +711,7 @@ async function updateCloudFormationNestedStack(
const projectRoot = pathManager.findProjectRoot();
const rootStackFilePath = path.join(pathManager.getRootStackBuildDirPath(projectRoot), rootStackFileName);
// deploy preprocess nested stack to disk
storeRootStackTemplate(context, nestedStack);
await storeRootStackTemplate(context, nestedStack);
const transformedStackPath = await preProcessCFNTemplate(rootStackFilePath);
const cfnItem = await new Cloudformation(context, generateUserAgentAction(resourcesToBeCreated, resourcesToBeUpdated));
const providerDirectory = path.normalize(path.join(backEndDir, providerName));
Expand Down Expand Up @@ -1185,7 +1185,7 @@ export async function generateAndUploadRootStack(context: $TSContext, destinatio
const projectDetails = context.amplify.getProjectDetails();
const nestedStack = await formNestedStack(context, projectDetails);

storeRootStackTemplate(context, nestedStack);
await storeRootStackTemplate(context, nestedStack);

// upload the nested stack
const s3Client = await S3.getInstance(context);
Expand Down

0 comments on commit 0567705

Please sign in to comment.