If backward/forward post-updates commands fails it rolls back

This commit is contained in:
jshkurti 2014-11-04 14:41:02 +01:00
parent 2ffd985258
commit 6dc9cea27d
2 changed files with 3 additions and 1 deletions

View File

@ -1540,6 +1540,7 @@ CLI.forward = function (process_name, cb) {
function(err, stdout, stderr){
if (err !== null)
{
vizion.prev({folder: proc.pm2_env.versioning.repo_path}, function(err, meta) {});
printError(err);
return cb ? cb({msg:err}) : exitCli(cst.ERROR_EXIT);
}
@ -1592,6 +1593,7 @@ CLI.backward = function (process_name, cb) {
function(err, stdout, stderr){
if (err !== null)
{
vizion.next({folder: proc.pm2_env.versioning.repo_path}, function(err, meta) {});
printError(err);
return cb ? cb({msg:err}) : exitCli(cst.ERROR_EXIT);
}

View File

@ -1,4 +1,4 @@
B1;2802;0c#!/usr/bin/env bash
#!/usr/bin/env bash
SRC=$(cd $(dirname "$0"); pwd)
source "${SRC}/include.sh"