Open jessicatarra opened 1 month ago
Any progress on this @jessicatarra? :blush:
Hey everyone, @spydon Sorry for the late reply. Work's been pretty busy lately, but I finally got some time this weekend to dig back into this fix. I managed to make things work, but now I'm stuck on figuring out how to keep the logs consistent with our current style. The issue is, this persistent shell (as it is implemented) makes it tricky to track the results of individual commands. To help us brainstorm a solution, I'm sharing my implementation so far. Let's see what we can come up with together.
melos:test:
steps:
- cd packages/melos
- pwd
- dart test .
melos run melos:test
➡️ step: cd packages/melos
➡️ step: pwd
/Users/jessicatarra/Development/melos/packages/melos
➡️ step: dart test .
… (long logs from dart test step)
ERROR: Shell process completed with errors.
Shell process completed some steps successfully.
This PR addresses the issue raised in #470, where the working directory is not maintained across multiple steps in a script.
For example, consider the following script:
When running this script using melos run, the output will show the workspace root directory, not the
packages/
directory as expected.This PR introduces a change to ensure that the working directory is properly maintained across multiple steps in a script.
The key changes are:
By running the script defined in the issue with the fix implemented in this PR, the output is now:
Type of Change
feat
-- New feature (non-breaking change which adds functionality)fix
-- Bug fix (non-breaking change which fixes an issue)!
-- Breaking change (fix or feature that would cause existing functionality to change)refactor
-- Code refactorci
-- Build configuration changedocs
-- Documentationchore
-- Chore