From 33e0e83c8e92ac8a5551e8902d2c7cc186f78f8b Mon Sep 17 00:00:00 2001 From: Rafa Mel Date: Wed, 1 May 2019 07:18:36 +0200 Subject: [PATCH] feat(public/kpo): takes scripts to replace into account on raise --- src/public/kpo/raise.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/public/kpo/raise.ts b/src/public/kpo/raise.ts index b4ce95b..1c0172f 100644 --- a/src/public/kpo/raise.ts +++ b/src/public/kpo/raise.ts @@ -70,8 +70,10 @@ function raise(options: IRaiseOptions = {}): () => Promise { (key) => !selected.includes(key) ); - const toRemove = selected.filter((key) => !taskNames.includes(key)); const toAdd = taskNames.filter((key) => !selected.includes(key)); + const toRemove = selected + .filter((key) => !taskNames.includes(key)) + .concat(Object.keys(scripts).filter((key) => toAdd.includes(key))); let msg = chalk.bold.green('No pending scripts changes'); if (toRemove.length || toAdd.length) {