docs: Shell规则去除具体版本号,区分Windows开发机与Ubuntu测试盒
- 不写 pwsh 具体版本号/WindowsApps路径,升级后不过时 - Windows 开发机用 pwsh(PATH 中的 PowerShell 7) - Ubuntu 测试盒子用 bash
This commit is contained in:
parent
23bfdecbb8
commit
709797b53a
@ -112,7 +112,7 @@ The config preview rendering pipeline: merge template + profile + overlays → r
|
||||
- **No tabs**: use spaces for indentation in all source files.
|
||||
- **No `fetch()` in templates** for page data — all API calls must go through Go server-side handlers. JS is only for UI interactivity (modals, carousels, confirm dialogs).
|
||||
- **No inline `onclick` with complex quoting** — use `data-*` attributes + event delegation instead.
|
||||
- **Use `pwsh`** for PowerShell commands (v7.6.4 in PATH — `C:\Program Files\PowerShell\7`, not `powershell.exe`).
|
||||
- **Use `pwsh`** for PowerShell commands on Windows dev machine (PATH 中的 PowerShell 7,勿用 `powershell.exe`;不要硬编码版本号)。测试盒子上用 bash(Ubuntu)。
|
||||
- **重启服务**:统一用 `pwsh -File scripts/safesightd.ps1 restart`,它会先编译、停旧进程、再启动新进程并做健康检查。不要手动 kill + build + start。
|
||||
- **如无必要,不使用数据库事务**:SQLite 只允许一个写者,事务会阻塞所有其他写操作。单个 `Exec` 已是原子操作,绝大多数场景不需要包裹事务。仅模板重命名等必须原子完成的多步操作才用事务。
|
||||
- **调试时只加日志,不改代码**:遇到 bug 先用 `fmt.Printf` 全量打印关键路径的状态和数据流,定位根因后再动手修。不要猜测、不要加 workaround(重试、超时、锁之类)。
|
||||
|
||||
@ -24,9 +24,8 @@ This repository is a plugin-based C++ video analytics system for RK3588. Develop
|
||||
|
||||
## Shell Environment Rules
|
||||
|
||||
- For agent-run shell commands on this workstation, use PowerShell 7.6 (current: 7.6.4, installed at `C:\Program Files\PowerShell\7\pwsh.exe`, first in user PATH) instead of Windows PowerShell 5.1.
|
||||
- Prefer invoking `pwsh` from PATH (resolves to 7.6.4); do not hardcode old WindowsApps MSIX paths (`Microsoft.PowerShell_7.6.0.0` is obsolete).
|
||||
- Do not rely on the system-default `powershell.exe` resolving to the desired version.
|
||||
- **Windows 开发机**:PowerShell 命令用 `pwsh`(PATH 中的 PowerShell 7,勿用系统默认 `powershell.exe` 5.1)。不要硬编码具体版本号或 WindowsApps MSIX 路径——升级后即过时。
|
||||
- **Ubuntu 测试盒子**:脚本语言为 bash(设备端本身也是 bash),直接用 bash/sh 执行。
|
||||
|
||||
## Plugin and Architecture Rules
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user