Commit 8d4c2169 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet

fix

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent 7cebc3cc
...@@ -105,9 +105,7 @@ func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypai ...@@ -105,9 +105,7 @@ func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypai
return nil, err return nil, err
} }
err = addTheWelcomeFile(conf, func(k u.Key) { err = addTheWelcomeFile(conf)
fmt.Printf("\nto get started, enter: ipfs cat %s\n", k)
})
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -117,7 +115,7 @@ func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypai ...@@ -117,7 +115,7 @@ func doInit(configRoot string, dspathOverride string, force bool, nBitsForKeypai
// addTheWelcomeFile adds a file containing the welcome message to the newly // addTheWelcomeFile adds a file containing the welcome message to the newly
// minted node. On success, it calls onSuccess // minted node. On success, it calls onSuccess
func addTheWelcomeFile(conf *config.Config, onSuccess func(u.Key)) error { func addTheWelcomeFile(conf *config.Config) error {
// TODO extract this file creation operation into a function // TODO extract this file creation operation into a function
nd, err := core.NewIpfsNode(conf, false) nd, err := core.NewIpfsNode(conf, false)
if err != nil { if err != nil {
...@@ -137,7 +135,7 @@ func addTheWelcomeFile(conf *config.Config, onSuccess func(u.Key)) error { ...@@ -137,7 +135,7 @@ func addTheWelcomeFile(conf *config.Config, onSuccess func(u.Key)) error {
if err != nil { if err != nil {
return fmt.Errorf("failed to write test file: %s", err) return fmt.Errorf("failed to write test file: %s", err)
} }
onSuccess(k) fmt.Printf("\nto get started, enter: ipfs cat %s\n", k)
return nil return nil
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment