beyondcode / beyondcode/polyscope-community
[Bug] Worktree creation generates broken Nginx config for Herd
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 20
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## Description
When Polyscope creates a worktree, it appears to register a new site in Laravel Herd's Nginx configuration. However, the generated config file contains empty replacement strings, which causes Nginx to fail to start entirely.
## Version
- Polyscope: **0.14.0**
- Laravel Herd (macOS)
## Steps to reproduce
1. Use Polyscope to create a worktree (e.g. for a PR)
2. Herd's Nginx server crashes and fails to restart
## Root cause
The generated Nginx site config (in `~/Library/Application Support/Herd/config/valet/Nginx/`) contains empty strings where paths should be:
```nginx
location / {
rewrite ^ "" last; # ← empty replacement, invalid in Nginx
}
error_page 404 ""; # ← empty
fastcgi_index ""; # ← empty
fastcgi_param SCRIPT_FILENAME ""; # ← empty
```
Nginx throws:
```
[emerg] empty replacement in .../config/valet/Nginx/jolly-newt.test:28
nginx: configuration file ... test failed
```
This prevents **all** Herd sites from working, not just the Polyscope worktree site.
## Expected behavior
The generated Nginx config should contain valid paths pointing to the worktree directory, or the site should not be registered in Herd if the paths are unavailable.
## Workaround
Manually delete the broken config file from `~/Library/Application Support/Herd/config/valet/Nginx/` and restart Herd.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, die Erstellung eines Worktrees für einen PR zu reproduzieren, und überprüfe die generierte Datei in ~/Library/Application Support/Herd/config/valet/Nginx/. Verfolge den Einstiegspunkt für die Registrierung des Worktrees bei Herd und ermittle, warum die Werte für rewrite, error_page, fastcgi_index und SCRIPT_FILENAME leer sind. Als erledigt gilt die Aufgabe, wenn die generierte Site gültige Worktree-Pfade enthält oder nicht registriert wird, wenn keine Pfade verfügbar sind, und die Nginx-Konfiguration von Herd erfolgreich startet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- laravel, nginx
- Bereich
- devops, infrastructure
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100