guybedford / chomp

'JS Make' - parallel task runner for the frontend ecosystem with a JS extension system.
https://chompbuild.com
Apache License 2.0
143 stars 7 forks source link

fix: path lookups chompfile-cwd relative #164

Closed guybedford closed 1 year ago

guybedford commented 1 year ago

When setting the cwd on a specific task, this was causing the node_modules/.bin automatic path inclusion to be relative to that task-specific cwd. Instead we use the Chompfile-level cwd here so that we use a consistent path lookup across all tasks and task-specific cwds do not affect the script pathing.

There could be an argument for mono repo patterns where commands should first be looked up in node_modules folders in sub-packages. I think that this should rather be tackled as any workspace work though in treating the path fallback as being from the workspace to the project here as part of the workspace support.