Skip to content

Commit

Permalink
Merge branch 'master' of github.com:infinitered/solidarity
Browse files Browse the repository at this point in the history
  • Loading branch information
GantMan committed Apr 3, 2018
2 parents 6915a9d + 9ed81d3 commit 56bd42e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion __tests__/command_helpers/checkRequirement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ describe('checkRequirement', () => {

test('failed CLI rule with custom message', async () => {
checkCLI.mockClear()
checkCLI.mockImplementation(() => true)
checkCLI.mockImplementation(() => customError)
const rule = toPairs({
YARN: [{ rule: 'cli', binary: 'gazorpazorp', error: customError }],
})[0]
Expand All @@ -199,6 +199,8 @@ describe('checkRequirement', () => {
})

test('failed ENV rule with custom message', async () => {
checkCLI.mockClear()
checkCLI.mockImplementation(() => true)
const rule = toPairs({
YARN: [{ rule: 'env', variable: 'gazorpazorp', error: customError }],
})[0]
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/functions/checkRequirement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = async (
const cliResult = await checkCLI(rule, context)
ruleString = `${requirementName} - ${rule.binary} binary`
if (cliResult) {
return addFailure(rule.error || cliResult)
return addFailure(cliResult)
} else {
return addSuccess(ruleString)
}
Expand Down

0 comments on commit 56bd42e

Please sign in to comment.