Deno: Panic when DENO_DIR not owned by current user

Created on 5 Aug 2019  路  5Comments  路  Source: denoland/deno

> deno version
deno: 0.13.0
v8: 7.7.200
typescript: 3.5.1
> deno install gist https://deno.land/std/examples/gist.ts -A
Download https://deno.land/[email protected]/installer/mod.ts
thread 'tokio-runtime-worker-0' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/libcore/result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread 'main' panicked at 'internal error: entered unreachable code', ../../third_party/rust_crates/registry/src/github.com-1ecc6299db9ec823/tokio-0.1.21/src/runtime/threadpool/mod.rs:296:26
thread 'tokio-runtime-worker-3' panicked at 'unexpected state while aborting task: Complete', ../../third_party/rust_crates/registry/src/github.com-1ecc6299db9ec823/tokio-threadpool-0.1.14/src/task/mod.rs:216:21
bug

Most helpful comment

@nimish-gupta Please do! It should be a small change.

All 5 comments

Still relevant?

I realized it happens when the cache directory is owned by some one else. A very valid reason to die, but it shouldn't panic - it ought to print a nicer message.

Hey @ry, can i start working on this issue?

@nimish-gupta Please do! It should be a small change.

Seems to work okay now. Can this be closed?

$ env DENO_DIR=/root target/debug/deno install gist https://deno.land/std/examples/gist.ts -A
Download https://deno.land/std/examples/gist.ts
Source code header cache failed for 'https://deno.land/std/examples/gist.ts': Permission denied (os error 13) (for '"/root/deps/https/deno.land/std/examples/gist.ts.headers.json"')
Was this page helpful?
0 / 5 - 0 ratings

Related issues

somombo picture somombo  路  3Comments

JosephAkayesi picture JosephAkayesi  路  3Comments

justjavac picture justjavac  路  3Comments

ry picture ry  路  3Comments

doutchnugget picture doutchnugget  路  3Comments