| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| t.is(result.stderr, 'cd: not a directory: test/resources/file1'); | ||
| }); | ||
|
|
||
| test('reports process.chdir() errors for existing directories', async t => { |
There was a problem hiding this comment.
Can we rename this test case to "shell.cd() not supported in workers" or something like that?
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1253 +/- ##
=======================================
Coverage 97.09% 97.10%
=======================================
Files 36 36
Lines 1517 1519 +2
=======================================
+ Hits 1473 1475 +2
Misses 44 44 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #1112.
When process.chdir() fails for an existing directory, cd() currently reclassifies the target as not a directory. In worker threads this hides Node's actual process.chdir() is not supported in workers error.
This keeps the existing no such file or directory and not a directory paths, but reports the original process.chdir() error when the target exists and is a directory.
Validation:
I also ran npm test; the cd tests passed, and the remaining local failures reproduced on a clean checkout before this change: chmod › Test setgid and four ls › long option assertions where this environment reports gid 0.