beyondcode / beyondcode/polyscope-community

[Bug] Worktree creation generates broken Nginx config for Herd

Đang mở
#80 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
20
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.