-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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(process): improve error message for process.cwd() when directory is deleted #57184
base: main
Are you sure you want to change the base?
Conversation
@jasnell can you check this i have done some thing that caused deletion of repo can you now check the pr |
Are there more changes to make |
@aduh95 can you check for further process to approve |
Any reason you're not taking any of my suggestions? It's certainly fine if you disagree with those, but please at least comment on each explaining why |
Ohh sorry I think I made the changes but did not commit |
Co-authored-by: Antoine du Hamel <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
@aduh95 i have made changes according to your suggesations |
removing extra space
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #57184 +/- ##
=======================================
Coverage 90.31% 90.31%
=======================================
Files 630 630
Lines 184513 184540 +27
Branches 36080 36077 -3
=======================================
+ Hits 166643 166671 +28
- Misses 10955 10967 +12
+ Partials 6915 6902 -13
|
can anyone tell me what should i do now |
@Ankush1oo8 As you can see, GH does point at failures in another test that are definitely related to this change – the exit code is now different in at least one case ( |
This PR improves the error message thrown by
process.cwd()
when the current working directory is deleted. Instead of throwing a new error, it enhances the original error message, making it clearer that the directory was deleted while the process was still inside it.Changes Made:
wrappedCwd()
to enhance the existing error message forENOENT: uv_cwd
instead of creating a newError
instance.process.chdir()
to switch directories).Before (Old Behavior):
When the working directory was deleted,
process.cwd()
threw a generic error with little context:After (New Behavior):
Now, the error provides a more meaningful message:
Relevant Issue:
(If this PR fixes an issue, add the issue number here)
Example: Fixes #57045
PR-URL:
#57184
Reviewer Notes:
-added to docs