Skip to content

Commit

Permalink
fix: 🐛 added skip steps to skip step functions if not configured
Browse files Browse the repository at this point in the history
Won't throw an error if step functions not present or no state machine defined
  • Loading branch information
KillDozerX2 committed Oct 21, 2022
1 parent 9bbee7a commit 3b27c73
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ function convertFunctionCrontabs(plugin = this) {
* @param {ServerlessLocalCrontabs} plugin
*/
function convertStepFunctionCrontabs(plugin = this) {
if (!plugin.serverless.service.stepFunctions) {
return;
}
else if (Object.keys(plugin.serverless.service.stepFunctions.stateMachines).length === 0) {
plugin.log.info("No state machines present but plugin configured")
return;
}
/**
* @type {Boolean}
*/
Expand Down

0 comments on commit 3b27c73

Please sign in to comment.