Fix #991: fix panic on "info" when IPFS not running

This commit is contained in:
Hector Sanjuan 2019-12-23 23:38:23 +01:00
parent f20a524bbc
commit db2ef9231a

View File

@ -118,9 +118,12 @@ func infoCmd(c *cli.Context) error {
if err != nil {
if config.IsErrFetchingSource(err) {
url = fmt.Sprintf(
"failed retrieving configuration source: %s",
"failed retrieving configuration source (%s)",
cfgHelper.Manager().Source,
)
ipfsCfg := ipfshttp.Config{}
ipfsCfg.Default()
cfgHelper.Configs().Ipfshttp = &ipfsCfg
} else {
return cli.Exit(errors.Wrapf(err, "reading the configurations in %s", absPath), 1)
}