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

caddy fmt overwrite should emit an error message #4524

Closed
bt90 opened this issue Jan 16, 2022 · 1 comment
Closed

caddy fmt overwrite should emit an error message #4524

bt90 opened this issue Jan 16, 2022 · 1 comment
Milestone

Comments

@bt90
Copy link
Contributor

bt90 commented Jan 16, 2022

Currently caddy fmt --overwrite fails rather silently if the file couldn't be modified:

user@vm:$ caddy fmt --overwrite /etc/caddy/Caddyfile
user@vm:$ echo $?
1

Could we add an error message? This would also follow other unix tools:

user@vm:$ mkdir /data
mkdir: cannot create directory '/data': Operation not permitted
@mholt
Copy link
Member

mholt commented Jan 16, 2022

Good point, we don't print the error message currently. We should do that.

@mholt mholt closed this as completed in 1a7a78a Jan 17, 2022
@mholt mholt added this to the v2.5.0 milestone Jan 17, 2022
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

No branches or pull requests

2 participants