Comparing version 2.1.2 to 2.1.3
@@ -0,4 +1,11 @@ | ||
const outputError = require('./output-error') | ||
const shell = require('shelljs') | ||
const repositoryUrl = shell.exec('hg path default', { silent: true }).stdout.trim() | ||
const hgPath = shell.exec('hg path default', { silent: true }) | ||
const hgBranch = shell.exec('hg branch', { silent: true }) | ||
const repositoryUrl = hgPath.stdout.trim() | ||
// hgBranch error message is more explicit, so we put it first | ||
if (hgBranch.stderr) outputError(hgBranch.stderr) | ||
if (hgPath.stderr) outputError(hgPath.stderr) | ||
const getCurrentBranchName = (() => { | ||
@@ -9,3 +16,3 @@ let currentBranch | ||
return currentBranch || (() => { | ||
return shell.exec('hg branch', { silent: true }).stdout.trim() | ||
return hgBranch.stdout.trim() | ||
})() | ||
@@ -12,0 +19,0 @@ } |
@@ -51,3 +51,3 @@ { | ||
}, | ||
"version": "2.1.2" | ||
"version": "2.1.3" | ||
} |
882345
706