Skip to content

Commit 7fd847b

Browse files
committed
fix(pinning): error out if hashes don't match
1 parent 50fb1b1 commit 7fd847b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,16 @@ async function deploy({
224224

225225
if (successfulRemotePinners.length > 0) {
226226
const pinnedHash = Object.values(pinnedHashes)[0]
227-
const gatewayUrl = httpGatewayUrl(pinnedHash, successfulRemotePinners[0])
228227
const isEqual = hash => hash === pinnedHash
229228
if (!fp.every(isEqual)(Object.values(pinnedHashes))) {
230229
const spinner = ora()
231230
spinner.fail('≠ Found inconsistency in pinned hashes:')
232231
logError(pinnedHashes)
232+
return undefined
233233
}
234234

235+
const gatewayUrl = httpGatewayUrl(pinnedHash, successfulRemotePinners[0])
236+
235237
if (copyHttpGatewayUrlToClipboard) {
236238
copyUrlToClipboard(gatewayUrl)
237239
}

0 commit comments

Comments
 (0)