fix: add cwd to ENOGITREPO error message

This commit is contained in:
Pierre Vanduynslager 2018-10-04 01:19:21 -04:00
parent bc8551c025
commit 9930dac69e
2 changed files with 3 additions and 3 deletions

View File

@ -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.`,
}),

View File

@ -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'));
}