MCPcopy Create free account
hub / github.com/Facets-cloud/flow / flowRoot

Function flowRoot

internal/app/init.go:14–23  ·  view source on GitHub ↗

flowRoot returns the root directory for flow state. Honors $FLOW_ROOT if set, otherwise falls back to ~/.flow. The returned path is not guaranteed to exist — callers that need it created should run `flow init` or create it themselves.

()

Source from the content-addressed store, hash-verified

12// to exist — callers that need it created should run `flow init` or create
13// it themselves.
14func flowRoot() (string, error) {
15 if r := os.Getenv("FLOW_ROOT"); r != "" {
16 return r, nil
17 }
18 home, err := os.UserHomeDir()
19 if err != nil {
20 return "", fmt.Errorf("no home dir: %w", err)
21 }
22 return filepath.Join(home, ".flow"), nil
23}
24
25// flowDBPath returns the absolute path to flow.db under the flow root.
26// Returns a clear error if the data directory hasn't been initialized.

Callers 15

versionCachePathFunction · 0.85
cmdDoFunction · 0.85
ownerShowFunction · 0.85
ownerRetireFunction · 0.85
addOwnerFunction · 0.85
addPlaybookFunction · 0.85
flowDBPathFunction · 0.85
cmdInitFunction · 0.85
cmdStatsFunction · 0.85
ownerTickManualFunction · 0.85
ownerTickDueFunction · 0.85
ownerDirForFunction · 0.85

Calls

no outgoing calls

Tested by 2