Skip to content

Commit 288f393

Browse files
committed
#3314 pm2 install <module> --safe
1 parent 83f899d commit 288f393

File tree

6 files changed

+281
-172
lines changed

6 files changed

+281
-172
lines changed

bin/pm2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,13 @@ commander.command('update')
441441
commander.command('install <module|git:// url>')
442442
.alias('module:install')
443443
.option('--v1', 'install module in v1 manner (do not use it)')
444+
.option('--safe [time]', 'keep module backup, if new module fail = restore with previous')
444445
.description('install or update a module and run it forever')
445446
.action(function(plugin_name, opts) {
446447
if (opts.v1)
447448
commander.v1 = true;
449+
if (opts.safe)
450+
commander.safe = opts.safe;
448451
pm2.install(plugin_name, commander);
449452
});
450453

0 commit comments

Comments
 (0)