[bug] `before*Command` should be relative to config file
Describe the bug
The command ran from before*Command is relative to *the nearest package.json relative to the clis cwdthis is weird enough on it's own, but causes real confusion whencding as part of the command, since all other paths in tauri.conf.jsonare relative to thetauri_dir`.
Reproduction
No response
Expected behavior
No response
Platform and versions
Operating System - Mac OS, version 12.2.0 X64
WARNING: no lock files found, defaulting to npm
Node.js environment
Node.js - 16.13.2
@tauri-apps/cli - 1.0.0-rc.4 (outdated, latest: 1.0.0-rc.5)
@tauri-apps/api - Not installed
Global packages
npm - 8.1.2
pnpm - 6.30.1
yarn - 3.1.0
Rust environment
rustup - 1.24.3
rustc - 1.58.1
cargo - 1.58.0
toolchain - stable-aarch64-apple-darwin
App directory structure
/cypress
/dist
/node_modules
/public
/.vite
/src
App
tauri - 1.0.0-rc.3 (no lockfile)
tauri-build - no manifest (no lockfile)
tao - no manifest (no lockfile)
wry - no manifest (no lockfile)
build-type - bundle
CSP - default-src 'self' style-src 'self' 'unsafe-inline' connect-src http://localhost:55001
distDir - ../../plz-out/gen/frontend/dist/client
devPath - http://localhost:3000/
framework - React
Stack trace
No response
Additional context
No response
I think if before*Command contains usage of package managers, yarn, pnpm, npm, they all execute the scripts relative to nearest package.json.
I think we had issues before with it being executed with tauri_dir as CWD. But I was planning to also add an option to set a custom CWD so we could change it.
Seems like this has been implemented and you can set cwd for it now