-
Notifications
You must be signed in to change notification settings - Fork 654
std/fs: walk
not found error is not Deno.errors.NotFound
#1310
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
Comments
I tried to reproduce the bug but it return import { walk } from "https://deno.land/[email protected]/fs/mod.ts";
try {
for await (const entry of walk("./deno")) {
console.log(entry.path);
}
} catch (error) {
console.log(error instanceof Deno.errors.NotFound);
} The result:
My configuration:
|
Related #1216 which contains steps to reproduce. After some investigations, I believe it is due to the same underlying issue: Rust Worth noting that a new So although far form ideal, it is expected that |
I got the same as @getspooky. Is this still an issue? |
Seems like not an issue. Let's close |
@lucacasonato @kt3k there's a related TODO in the fresh code here just FYI: |
@mikeatbuilder Thanks for the input. Sounds interesting. I think we should try to remove that workaround in fresh as this was a non issue |
@kt3k Have you tried on Linux. This may be fine on macOS, but it's still broken on Linux. |
Ok. I'll take a look |
It still seems NotFound in ubuntu ubuntu@ip-172-31-255-98:~$ ls
main.js
ubuntu@ip-172-31-255-98:~$ cat main.js
import { walk } from "https://deno.land/[email protected]/fs/mod.ts";
try {
for await (const entry of walk("./deno")) {
console.log(entry.path);
}
} catch (error) {
console.log(error instanceof Deno.errors.NotFound);
}
ubuntu@ip-172-31-255-98:~$ deno -V
deno 1.25.0
ubuntu@ip-172-31-255-98:~$ deno run -A main.js
true
ubuntu@ip-172-31-255-98:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04 LTS" |
If I put a file of the same name of walk entrypoint, then I get |
Is this still an issue on Linux? |
#3054 changed the types of errors thrown. This problem may no longer exist? |
denoland/fresh#1078 is failing on all platforms. The PR only removes the workaround that pertains to this issue. This issue should be re-opened or a new issue created. |
The issue in question, denoland/std#1310, has been marked complete. Looks like the underlying issue has been fixed. So this just removes the comment/unnecessary code. --------- Co-authored-by: Asher Gomez <[email protected]>
If you pass a path to
walk
that does not exist on the fs, the returned promise rejects with anError
, not aDeno.errors.NotFound
.The text was updated successfully, but these errors were encountered: