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

path.resolve depends on cwd #1136

Closed
ry opened this issue Aug 16, 2021 · 5 comments
Closed

path.resolve depends on cwd #1136

ry opened this issue Aug 16, 2021 · 5 comments
Labels
bug Something isn't working needs triage

Comments

@ry
Copy link
Member

ry commented Aug 16, 2021

Many applications still want path resolving functionality without this dependency.

Ref #685
Ref #643

@iuioiua
Copy link
Contributor

iuioiua commented Dec 3, 2023

I think we should fix this before Std. Lib. reaching stability. Do we have any ideas on how this can be solved?

@kt3k
Copy link
Member

kt3k commented Dec 4, 2023

path.resolve can be used for getting cwd:

import { resolve, dirname } from "https://deno.land/[email protected]/path/mod.ts";
const resolved = resolve("foo");
console.log(resolved);
const cwd = dirname(resolved);
console.log(cwd);

What is the expected permission requirement for path.resolve?

@iuioiua
Copy link
Contributor

iuioiua commented Dec 4, 2023

IIUC it's for std/path functions, not to require any permissions. Right now, it requires --allow-read permissions. #685 had the interesting idea of having a fs.resolvePath(), which does require --allow-read permissions, but expectedly so.

@kt3k
Copy link
Member

kt3k commented Jan 27, 2025

Note: Deno runtime is updating Deno.cwd() and it requires no permission in the future version (2.2.0) denoland/deno#27192

@kt3k
Copy link
Member

kt3k commented Jan 29, 2025

Closing as Deno.cwd() no longer requires 'read' permission

ref: denoland/deno#27192

@kt3k kt3k closed this as completed Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

3 participants