From f0002b6c9710f818b9385aafeb1bde994fe3b370 Mon Sep 17 00:00:00 2001 From: Mikeal Rogers Date: Sat, 2 Feb 2019 09:07:12 -0800 Subject: [PATCH] fix: absolute import path --- merge-release-run.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/merge-release-run.js b/merge-release-run.js index 423aef1..57780ec 100644 --- a/merge-release-run.js +++ b/merge-release-run.js @@ -2,6 +2,7 @@ console.log(process.argv) const fs = require('fs') +const path = require('path') const { execSync } = require('child_process') /* Configure git */ @@ -20,7 +21,7 @@ if (messages.map(message => message.includes('BREAKING CHANGE')).includes(true)) version = 'minor' } -let pkg = require('./package.json') +let pkg = require(path.join(process.cwd(), 'package.json')) let current = execSync(`npm view ${pkg.name} version`).toString() process.stdout.write(execSync(`npm version --allow-same-version=true --git-tag-version=false ${current} `)) let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString()