Skip to content

Commit

Permalink
fix: Print created project dir afterward (#186)
Browse files Browse the repository at this point in the history
Signed-off-by: AlexNg <[email protected]>
  • Loading branch information
caffeine-addictt authored Jan 20, 2025
1 parent f505930 commit d483114
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions cmd/commands/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,22 @@ var NewCmd = &cobra.Command{

if options.NewOpts.NoGit {
log.Infoln("skipping git initialization")
return nil
} else {
err = ui.RunWithSpinner("initializing git...", func() error {
return git.Init(projectRootDir)
})
if err != nil {
fmt.Printf("failed to initialize git: %s\n", err)
return errors.NewWakuErrorf("failed to initialize git: %s\n", err)
}
}

err = ui.RunWithSpinner("initializing git...", func() error {
return git.Init(projectRootDir)
})
dirPath, err := filepath.Abs(projectRootDir)
if err != nil {
fmt.Printf("failed to initialize git: %s\n", err)
return errors.NewWakuErrorf("failed to initialize git: %s\n", err)
return errors.ToWakuError(err)
}

log.Printf("Project created at: %s\n", dirPath)
return nil
},
}
Expand Down

0 comments on commit d483114

Please sign in to comment.