Fix #991: fix panic on "info" when IPFS not running
This commit is contained in:
parent
f20a524bbc
commit
db2ef9231a
|
@ -118,9 +118,12 @@ func infoCmd(c *cli.Context) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if config.IsErrFetchingSource(err) {
|
if config.IsErrFetchingSource(err) {
|
||||||
url = fmt.Sprintf(
|
url = fmt.Sprintf(
|
||||||
"failed retrieving configuration source: %s",
|
"failed retrieving configuration source (%s)",
|
||||||
cfgHelper.Manager().Source,
|
cfgHelper.Manager().Source,
|
||||||
)
|
)
|
||||||
|
ipfsCfg := ipfshttp.Config{}
|
||||||
|
ipfsCfg.Default()
|
||||||
|
cfgHelper.Configs().Ipfshttp = &ipfsCfg
|
||||||
} else {
|
} else {
|
||||||
return cli.Exit(errors.Wrapf(err, "reading the configurations in %s", absPath), 1)
|
return cli.Exit(errors.Wrapf(err, "reading the configurations in %s", absPath), 1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user