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

import.meta.dirname doesn't include a trailing forward slash #24278

Closed
rafrafek opened this issue Jun 19, 2024 · 0 comments · Fixed by #24295
Closed

import.meta.dirname doesn't include a trailing forward slash #24278

rafrafek opened this issue Jun 19, 2024 · 0 comments · Fixed by #24295
Assignees
Labels
bug Something isn't working correctly

Comments

@rafrafek
Copy link

Version: Deno 1.44.4 (release, aarch64-unknown-linux-gnu)
also: Deno 1.44.2 (release, aarch64-apple-darwin)

import.meta.dirname is expected to include a trailing forward slash according to the docs (/home/alice/ not /home/alice):

* console.log(import.meta.dirname); // /home/alice/

but my code:

console.log(new URL(".", import.meta.url).pathname);
console.log(import.meta.dirname);

outputs:

2024-06-19 22:33:07 /app/
2024-06-19 22:33:07 /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants