From 80c6b4b7d46ba61ff77b281681223b82cccb5d1b Mon Sep 17 00:00:00 2001 From: Dylan Vorster Date: Tue, 18 Sep 2018 15:13:15 +0200 Subject: [PATCH] semver gets messed up with non standard chars --- src/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.js b/src/index.js index 5c8fdb4..c697600 100644 --- a/src/index.js +++ b/src/index.js @@ -53,6 +53,9 @@ function main() { process.exit(-1); } + // branches often contain chars such as _ which is not valid semver + branch = branch.replace(/(_|-|\[|\]|\\|\/)/g,""); + const packageJSONPath = resolve('package.json'); log(`Reading from ${ magenta(packageJSONPath) }`);