diff --git a/lib/definitions/errors.js b/lib/definitions/errors.js index de5611ac..a63b81ee 100644 --- a/lib/definitions/errors.js +++ b/lib/definitions/errors.js @@ -9,11 +9,11 @@ const stringify = obj => (isString(obj) ? obj : inspect(obj, {breakLength: Infin const linkify = file => `${homepage}/blob/caribou/${file}`; module.exports = { - ENOGITREPO: () => ({ + ENOGITREPO: ({cwd}) => ({ message: 'Not running from a git repository.', details: `The \`semantic-release\` command must be executed from a Git repository. -The current working directory is \`${process.cwd()}\`. +The current working directory is \`${cwd}\`. Please verify your CI configuration to make sure the \`semantic-release\` command is executed from the root of the cloned repository.`, }), diff --git a/lib/verify.js b/lib/verify.js index b1d25ffb..462d9a60 100644 --- a/lib/verify.js +++ b/lib/verify.js @@ -7,7 +7,7 @@ module.exports = async ({cwd, env, options: {repositoryUrl, tagFormat}}) => { const errors = []; if (!(await isGitRepo({cwd, env}))) { - errors.push(getError('ENOGITREPO')); + errors.push(getError('ENOGITREPO', {cwd})); } else if (!repositoryUrl) { errors.push(getError('ENOREPOURL')); }