Make Tauri pre-build/dev hooks resilient to script location#185
Make Tauri pre-build/dev hooks resilient to script location#185
Conversation
PR Review: Tauri pre-build/dev hooks resilient to script locationSummaryThe PR replaces simple Issues Found1. Code Duplication (Maintainability) 2. Minified/Compressed Code 3. The Script Already Handles Path Resolution 4. Missing Error Handling Recommendations
|
Merge pull request #185 from Open-VCS/codex/github-mention-build-script-issue Make Tauri pre-build/dev hooks resilient to script location

Motivation
Backend/scripts/run-tauri-before-command.jsis found and executed when running Tauri commands regardless of current working directory and provide a clear error if it cannot be located.Description
build.beforeDevCommandandbuild.beforeBuildCommandinBackend/tauri.conf.jsonwith inlinenode -esnippets that search multiple candidate paths, resolve them withpath.resolve, and check existence withfs.existsSyncbefore running the script viaspawnSync.Testing
tauri devwhich invoked the newbeforeDevCommandand completed successfully.tauri buildwhich invoked the newbeforeBuildCommandand completed successfully.Codex Task