mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
If backward/forward post-updates commands fails it rolls back
This commit is contained in:
parent
2ffd985258
commit
6dc9cea27d
@ -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);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
B1;2802;0c#!/usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SRC=$(cd $(dirname "$0"); pwd)
|
||||
source "${SRC}/include.sh"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user