improve init

This commit is contained in:
2026-01-14 17:59:17 +00:00
parent 095a92dfc2
commit d211493e3c

View File

@@ -250,10 +250,16 @@ func runInit() error {
return err
}
if err := ensureGitignoreEntries(filepath.Join(cwd, ".gitignore"), []string{"pocketbase", "pb_data", ".env", ".DS_store"}); err != nil {
if err := ensureGitignoreEntries(filepath.Join(cwd, ".gitignore"), []string{"pocketbase", "pb_data", ".env", ".DS_Store"}); err != nil {
return err
}
for _, dir := range []string{"pb_public", "pb_migrations", "pb_hooks"} {
if err := os.MkdirAll(filepath.Join(cwd, dir), 0o755); err != nil {
return err
}
}
fmt.Printf("Initialized PocketBase project %q\n", serviceName)
return nil
}