beyondcode / beyondcode/polyscope-community
[Bug] Worktree creation generates broken Nginx config for Herd
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 20
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
## 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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo la creazione di un worktree per una PR e ispeziona il file generato in ~/Library/Application Support/Herd/config/valet/Nginx/. Segui il punto di ingresso della registrazione del worktree in Herd e determina perché i valori di rewrite, error_page, fastcgi_index e SCRIPT_FILENAME sono vuoti. Il lavoro è completato quando il sito generato contiene percorsi di worktree validi, oppure non viene registrato quando i percorsi non sono disponibili, e la configurazione Nginx di Herd si avvia correttamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- laravel, nginx
- Ambito
- devops, infrastructure
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100