fix: create plugins/ directory during install

Avoids gt doctor warning about missing plugin directory on fresh install.
The patrol-plugins-accessible check expects town-level plugins/ directory.
This commit is contained in:
Dustin Smith
2026-01-19 21:17:40 +07:00
parent 2333b38ecf
commit b28c25b8a2

View File

@@ -228,6 +228,15 @@ func runInstall(cmd *cobra.Command, args []string) error {
fmt.Printf(" %s Could not create boot directory: %v\n", style.Dim.Render("⚠"), err)
}
// Create plugins directory for town-level patrol plugins.
// This avoids gt doctor warning on fresh install.
pluginsDir := filepath.Join(absPath, "plugins")
if err := os.MkdirAll(pluginsDir, 0755); err != nil {
fmt.Printf(" %s Could not create plugins directory: %v\n", style.Dim.Render("⚠"), err)
} else {
fmt.Printf(" ✓ Created plugins/\n")
}
// Create daemon.json patrol config.
// This avoids gt doctor warning on fresh install.
if err := config.EnsureDaemonPatrolConfig(absPath); err != nil {