improve init
This commit is contained in:
8
main.go
8
main.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user