Skip to content

Commit

Permalink
Meh
Browse files Browse the repository at this point in the history
  • Loading branch information
firelizzard18 committed Jul 2, 2024
1 parent 030a0e4 commit 206ac34
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/cmd/debug/heal_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,19 @@ func init() {

cmdHeal.PersistentPreRun = func(cmd *cobra.Command, args []string) {
if !cmd.Flag("peer-db").Changed {
peerDb = filepath.Join(currentUser.HomeDir, ".accumulate", "cache", strings.ToLower(args[0])+"-peers.json")
path := filepath.Join(".accumulate", "cache", strings.ToLower(args[0])+"-peers.json")
peerDb = filepath.Join(currentUser.HomeDir, path)
slog.Info("Automatically selected peer database", "path", filepath.Join("~", path))
}
if !cmd.Flag("cached-scan").Changed {
cachedScan = filepath.Join(currentUser.HomeDir, ".accumulate", "cache", strings.ToLower(args[0])+".json")
path := filepath.Join(".accumulate", "cache", strings.ToLower(args[0])+".json")
cachedScan = filepath.Join(currentUser.HomeDir, path)
slog.Info("Automatically selected cached scan", "path", filepath.Join("~", path))
}
if f := cmd.Flag("light-db"); f != nil && !f.Changed {
lightDb = filepath.Join(currentUser.HomeDir, ".accumulate", "cache", strings.ToLower(args[0])+".db")
path := filepath.Join(".accumulate", "cache", strings.ToLower(args[0])+".db")
lightDb = filepath.Join(currentUser.HomeDir, path)
slog.Info("Automatically selected light database", "path", filepath.Join("~", path))
}
}
}
Expand Down

0 comments on commit 206ac34

Please sign in to comment.