Skip to content

Commit 56bd42e

Browse files
committed
Merge branch 'master' of github.com:infinitered/solidarity
2 parents 6915a9d + 9ed81d3 commit 56bd42e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

__tests__/command_helpers/checkRequirement.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe('checkRequirement', () => {
189189

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

201201
test('failed ENV rule with custom message', async () => {
202+
checkCLI.mockClear()
203+
checkCLI.mockImplementation(() => true)
202204
const rule = toPairs({
203205
YARN: [{ rule: 'env', variable: 'gazorpazorp', error: customError }],
204206
})[0]

src/extensions/functions/checkRequirement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ module.exports = async (
7575
const cliResult = await checkCLI(rule, context)
7676
ruleString = `${requirementName} - ${rule.binary} binary`
7777
if (cliResult) {
78-
return addFailure(rule.error || cliResult)
78+
return addFailure(cliResult)
7979
} else {
8080
return addSuccess(ruleString)
8181
}

0 commit comments

Comments
 (0)