path.resolve depends on cwd
Many applications still want path resolving functionality without this dependency.
Ref https://github.com/denoland/deno_std/pull/685 Ref #643
I think we should fix this before Std. Lib. reaching stability. Do we have any ideas on how this can be solved?
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?
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.