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

Better error message when unable to create cache dirs #5120

Merged
merged 1 commit into from
May 7, 2020

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented May 7, 2020

This PR improves the error messages in the cases when DENO_DIR is not owned by the current user and unable to create cache dirs.

The error messages become like the below:

$ sudo mkdir deno_dir
$ sudo chmod 755 deno_dir
$ DENO_DIR=./deno_dir ./target/debug/deno run test.js 
Could not create TypeScript compiler cache location: "./deno_dir/gen"
Check the permission of the directory.
$ sudo mkdir deno_dir/gen
$ DENO_DIR=./deno_dir ./target/debug/deno run test.js 
Could not create remote modules cache location: "./deno_dir/deps"
Check the permission of the directory.
$ sudo mkdir deno_dir/deps
$ DENO_DIR=./deno_dir ./target/debug/deno run test.js 
1

This (maybe) closes #2731

@kt3k kt3k force-pushed the feature/better-deno-dir-error branch from 0e80253 to 9d8d911 Compare May 7, 2020 01:15
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @kt3k

@bartlomieju bartlomieju merged commit dabe88f into denoland:master May 7, 2020
@kt3k kt3k deleted the feature/better-deno-dir-error branch May 7, 2020 12:34
SASUKE40 pushed a commit to SASUKE40/deno that referenced this pull request May 7, 2020
Add better error messages when a cache subdirectory in 
`DENO_DIR` cannot be created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when DENO_DIR not owned by current user
2 participants