Skip to content

Commit

Permalink
fix(cmd): invalid data directory on bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Jan 14, 2025
1 parent a08ea03 commit bdc5fb8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ var bootstrapCmd = &cobra.Command{
Long: bootstrapCmdLong,
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
// Exit the application in an invalid state
if algod.IsInstalled() && !algod.IsService() {
dataDir, _ := algod.GetDataDir("")
if dataDir == "" {
dataDir = "<Path to data directory>"
}
log.Warn("algorand is installed, but not running as a service. Continue at your own risk!")
log.Warn(fmt.Sprintf("try connecting to the node with: ./nodekit -d %s", dataDir))
log.Fatal("invalid state, exiting")
}

ctx := context.Background()
httpPkg := new(api.HttpPkg)
r, _ := glamour.NewTermRenderer(
Expand Down

0 comments on commit bdc5fb8

Please sign in to comment.