Commit f31ba8f4 authored by shangbj's avatar shangbj

1

parent 3badaac4
......@@ -10,7 +10,8 @@ const mergeMsgPath = path.join(gitPath,'../','MERGE_MSG')
function mergeCheck(){
console.log(logSymbols.info, chalk.blue('开始分支检测...'))
const mergeMsg = fs.readFileSync(mergeMsgPath, 'utf-8');
const curBranch = execSync(`git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,'`, {encoding: 'utf-8'})
let curBranch = execSync("git symbolic-ref HEAD | sed -e \'s,.*/\(.*\),\1,\'", {encoding: 'utf-8'})
console.log(curBranch)
console.log(mergeMsg.join(' ').pop())
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment