Skip to content

Commit

Permalink
fix: trigger resources path (#9131)
Browse files Browse the repository at this point in the history
* fix: trigger resources path

* fix: trigger path fix
  • Loading branch information
akshbhu authored Nov 29, 2021
1 parent b6504ca commit ec7b03d
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {
$TSAny,
$TSContext,
AmplifyCategories,
AmplifySupportedService,
JSONUtilities,
open,
PathConstants,
Expand Down Expand Up @@ -431,7 +433,14 @@ async function initTriggerEnvs(context, resourceParams, providerPlugin, envParam
const currentTrigger = resourceParams.resourceName.replace(parentResourceParams.resourceName, '');
if (currentTrigger && currentTrigger !== resourceParams.resourceName) {
const currentEnvVariables = context.amplify.loadEnvResourceParameters(context, categoryName, resourceParams.resourceName);
const triggerPath = `${__dirname}/../../../../amplify-category-${resourceParams.parentStack}/provider-utils/${srvcMetaData.provider}/triggers/${currentTrigger}`;
const categoryPlugin = context.amplify.getCategoryPluginInfo(context, resourceParams.parentStack);
const triggerPath = path.join(
categoryPlugin.packageLocation,
'provider-utils',
`${srvcMetaData.provider}`,
'triggers',
`${currentTrigger}`,
);
const isEnvCommand = context.input.command === 'env';

if (!isEnvCommand) {
Expand Down

0 comments on commit ec7b03d

Please sign in to comment.