nrwl / nx-cloud-workflows

MIT License
10 stars 6 forks source link

fix: re-adding remember value #30

Closed pmariglia closed 8 months ago

pmariglia commented 8 months ago

The problem here was that the env file can start out with an empty string "", and the previous logic was adding a newline to that value before adding the new environment variable, resulting in a file that looks like this:

                                        # <-- empty line
NX_CACHE_STEP_WAS_SUCCESSFUL_HIT=true

This would not be properly parsed by the runner.

Changing the implementation to appendFileSync, as well as putting the newline after the new variable fixes the issue