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

All write-related filesystem errors are being reported as "permission denied" #130

Closed
keichan34 opened this issue Dec 1, 2022 · 3 comments · Fixed by #139
Closed

All write-related filesystem errors are being reported as "permission denied" #130

keichan34 opened this issue Dec 1, 2022 · 3 comments · Fixed by #139

Comments

@keichan34
Copy link
Contributor

Describe the bug
All write-related filesystem errors are being reported as "permission denied"

try {
fs.writeFileSync(stylePath, styleYAML)
} catch (err) {
throw `${stylePath}: Permission denied`
}

To Reproduce
Run convert with a destination of a volume that is full or read-only

Expected behavior
A detailed error describing that the volume is full

Charites Version:

  • Charites version: 0.X.X

Desktop (please complete the following information):

  • OS: [e.g. Windows]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
I think that the underlying error should be exposed instead of overwriting it. This has lead to confusing error reports: #56 , where the error reports "permission denied" when it should ENOENT: no such file or directory (that bug was because the parent directory wasn't being created, which throws the no such file or directory error)

@ubukawa
Copy link
Contributor

ubukawa commented Dec 14, 2022

Dear @keichan34 and @miya0001 ,

Thank you very much for improving charites!
If it is possible, can you also update npm package so that we can use the charites with improvement by the pull request #129?
#129

I can use it by cloning the repository, but it would be easy for users to install via npm.
Thank you very much for your kind attention!

Best regards, Taro Ubukawa

@keichan34
Copy link
Contributor Author

@ubukawa Sorry for the late release! I just merged a couple outstanding pull requests and created a new release 0.3.0 :)

keichan34 added a commit to keichan34/charites that referenced this issue Dec 15, 2022
keichan34 added a commit to keichan34/charites that referenced this issue Dec 15, 2022
@ubukawa
Copy link
Contributor

ubukawa commented Dec 15, 2022

Dear @keichan34 ,
Thank you very very much for your prompt response!
I really appreciate your continued contribution.

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 a pull request may close this issue.

2 participants