Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #3786 fix issue when triggering an action that does not exist #3874

Merged
merged 2 commits into from
Aug 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/God/ActionMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,16 @@ module.exports = function(God) {

var proc_env = God.clusters_db[id].pm2_env;

const isActionAvailable = proc_env.axm_actions.find(action => action.action_name === cmd.msg) !== undefined

// if action doesn't exist for this app
// try with the next one
if (isActionAvailable === false) {
arr.shift();
return ex(arr);
}


if ((p.basename(proc_env.pm_exec_path) == name ||
proc_env.name == name) &&
(proc_env.status == cst.ONLINE_STATUS ||
Expand Down