Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 1281b9f

Browse files
authored
fix: only try to get ipfs if argv is present (#2504)
Sometimes you've done something silly like required a module that isn't installed or called a method that isn't a property of an object in which case `argv` won't have a value, causing an unrelated error to appear. This PR just makes sure `argv` has a value before trying to access `argv.getIpfs`
1 parent 60064b6 commit 1281b9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/bin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ cli
4949
}
5050
})
5151
.catch(({ error, argv }) => {
52-
getIpfs = argv.getIpfs
52+
getIpfs = argv && argv.getIpfs
5353
if (error.message) {
5454
print(error.message)
5555
debug(error)

0 commit comments

Comments
 (0)