hop: initial project state

This commit is contained in:
Hop
2026-07-11 08:35:07 -07:00
parent ed2cba60db
commit a70773826f
14 changed files with 960 additions and 174 deletions
+3 -1
View File
@@ -20,6 +20,8 @@ import (
const maxRecordedOutput = 128 * 1024
var ErrNotHopProject = errors.New("not inside a Hop project")
func FindHopRoot(start string) (string, error) {
if configured := os.Getenv("HOP_ROOT"); configured != "" {
return requireHopRoot(configured)
@@ -48,7 +50,7 @@ func FindHopRoot(start string) (string, error) {
break
}
}
return "", fmt.Errorf("not inside a Hop project; run 'hop init' first")
return "", fmt.Errorf("%w; run 'hop init' first", ErrNotHopProject)
}
func requireHopRoot(root string) (string, error) {