Merge pull request #185 from Open-VCS/codex/github-mention-build-script-issue Make Tauri pre-build/dev hooks resilient to script location#186
Conversation
…pt-issue Make Tauri pre-build/dev hooks resilient to script location
Code Review: PR #185SummaryThis PR makes Tauri pre-build/dev hooks resilient to script location by replacing simple Issues Found1. Code Duplication (Medium) 2. Missing Semicolons (Low) 3. Unhandled Exception (Medium) try {
const result = spawnSync(process.execPath, [script, 'dev'], { stdio: 'inherit' });
process.exit(result.status ?? 1);
} catch (e) {
console.error('Failed to spawn script:', e);
process.exit(1);
}4. Signal Handling (Low) process.exit(result.status ?? (result.signal ? 1 : 1));5. Hardcoded Candidates (Low) Positive Aspects
RecommendationApprove with suggestions to extract a helper script to avoid duplication and add error handling. The core functionality is correct. |
Code Review: PR #185SummaryMakes Tauri pre-build/dev hooks resilient to script location by replacing hardcoded paths with inline Node.js scripts that search multiple candidate paths. Issues1. Hardcoded candidate paths may not cover all scenarios
2. No logging when script is found
3. Error message could be clearer But it's checking paths relative to CWD, not just Suggestions
VerdictFunctional improvement with minor polish opportunities. The core approach is sound—searching multiple candidates handles the main use case. The inline script is verbose but acceptable for a configuration file where shell portability is limited. |


No description provided.