Monorepo for Tangled tangled.org
8

Configure Feed

Select the types of activity you want to include in your feed.

hook/setup: auto-create scan path if missing

author
Jes Olson
committer
Tangled
date (May 10, 2026, 9:21 AM +0300) commit 4eb8cf9a parent e6e70541
+4
+4
hook/setup.go
··· 5 5 import ( 6 6 "errors" 7 7 "fmt" 8 + "io/fs" 8 9 "os" 9 10 "path/filepath" 10 11 "strings" ··· 54 55 func Setup(config config) error { 55 56 // iterate over all directories in current directory: 56 57 repoDirs, err := os.ReadDir(config.scanPath) 58 + if errors.Is(err, fs.ErrNotExist) { 59 + return os.MkdirAll(config.scanPath, 0755) 60 + } 57 61 if err != nil { 58 62 return err 59 63 }