Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors.json logging ENOENT: no such file or directory #2332

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Sep 13, 2023

This PR helped me find and fix an issue in #2306

Before that I was stuck with this error in the terminal:

Error: ENOENT: no such file or directory, open '/private/var/folders/2k/ws6lqbf57d75yf8xt7tt_bqc0000gn/T/test-prototype/.tmp/errors.json'

My issue had crashed early enough to confirm:

  1. The helper flagError() can run before .tmp directory exists
  2. Errors can be written as empty strings by writeJsonSync(errorPath, { error })

This PR stops that from happening

It was possible for `flagError()` to run before the .tmp directory had been created
@colinrotherham colinrotherham merged commit 40af747 into main Sep 18, 2023
27 checks passed
@colinrotherham colinrotherham deleted the error-logging branch September 18, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants