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

Ensure parent directory exists before writing log/diagnostics file #1117

Conversation

codykaup
Copy link
Contributor

@codykaup codykaup commented Nov 1, 2024

It's possible to send --log-file and --diagnostics-file to a random location that doesn't exist yet. In those cases, we were throwing a ENOENT error when attempting to write to the stream. This ensures the parent directory exists before we attempt to write those files!

📦 Published PR as canary version: 11.16.5--canary.1117.11667960642.0

✨ Test out this PR locally via:

npm install chromatic@11.16.5--canary.1117.11667960642.0
# or 
yarn add chromatic@11.16.5--canary.1117.11667960642.0

@codykaup codykaup added release Auto: Create a `latest` release when merged patch Auto: Increment the patch version when merged labels Nov 1, 2024
@codykaup codykaup self-assigned this Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

📦 Package Size: 5380 KB
✅ Compared to main: 0 KB db3848b (5380 KB)

@codykaup codykaup force-pushed the cody/cap-2375-chromatic-cli-fails-to-create-directory-paths-for-log-files branch from 92c9481 to 0b40fff Compare November 1, 2024 21:20
Copy link

codacy-production bot commented Nov 1, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01% (target: -1.00%) 66.67% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (db3848b) 7116 4839 68.00%
Head commit (6cd81a7) 7121 (+5) 4843 (+4) 68.01% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1117) 9 6 66.67%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@codykaup codykaup force-pushed the cody/cap-2375-chromatic-cli-fails-to-create-directory-paths-for-log-files branch from 0b40fff to 6cd81a7 Compare November 1, 2024 21:32
@codykaup codykaup marked this pull request as ready for review November 1, 2024 21:58
@codykaup codykaup requested a review from a team November 1, 2024 21:58
@codykaup codykaup added this pull request to the merge queue Nov 4, 2024
Merged via the queue into main with commit 2d9a2ff Nov 4, 2024
22 of 23 checks passed
@codykaup codykaup deleted the cody/cap-2375-chromatic-cli-fails-to-create-directory-paths-for-log-files branch November 4, 2024 15:59
@chromatic-ci-bot
Copy link
Collaborator

🚀 PR was released in v11.16.4 🚀

@chromatic-ci-bot chromatic-ci-bot added the released Verdict: This issue/pull request has been released label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Auto: Increment the patch version when merged release Auto: Create a `latest` release when merged released Verdict: This issue/pull request has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants