(start string, markers []string)
| 416 | } |
| 417 | } |
| 418 | return result, nil |
| 419 | } |
| 420 | |
| 421 | func instructionHomeDir() string { |
| 422 | if home := strings.TrimSpace(os.Getenv("HOME")); home != "" { |
| 423 | return home |
| 424 | } |
| 425 | home, _ := os.UserHomeDir() |
| 426 | return home |
| 427 | } |
| 428 | |
| 429 | func findLuminaProjectRoot(cwd string) (string, error) { |
| 430 | cfg := config.NewConfigForCWD(cwd) |
| 431 | result, err := DiscoverProjectDocs(cwd, cfg) |
| 432 | if err != nil { |
| 433 | return "", err |
| 434 | } |
| 435 | if result.FallbackPath != "" { |
| 436 | return filepath.Dir(result.FallbackPath), nil |
| 437 | } |
| 438 | if len(result.Docs) > 0 { |
| 439 | return result.Root, nil |
no outgoing calls
no test coverage detected