Skip to content

Commit 3199047

Browse files
committed
do an explicit import, always print right error message
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
1 parent 5291514 commit 3199047

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/ipfs/main.go

+3
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ func getApiClient(repoPath, apiAddrStr string) (cmdsHttp.Client, error) {
622622
if err != nil {
623623
return nil, err
624624
}
625+
if len(addr.Protocols()) == 0 {
626+
return nil, fmt.Errorf("mulitaddr doesn't provide any protocols")
627+
}
625628
} else {
626629
addr, err = fsrepo.APIAddr(repoPath)
627630
if err == repo.ErrApiNotRunning {

0 commit comments

Comments
 (0)