Skip to content

Commit

Permalink
do an explicit import, always print right error message
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
  • Loading branch information
Kubuxu committed Nov 2, 2016
1 parent 5291514 commit 3199047
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ipfs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,9 @@ func getApiClient(repoPath, apiAddrStr string) (cmdsHttp.Client, error) {
if err != nil {
return nil, err
}
if len(addr.Protocols()) == 0 {
return nil, fmt.Errorf("mulitaddr doesn't provide any protocols")
}
} else {
addr, err = fsrepo.APIAddr(repoPath)
if err == repo.ErrApiNotRunning {
Expand Down

0 comments on commit 3199047

Please sign in to comment.