twpayne/chezmoi

List files that are being applied when verbose option is specified

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.

It's difficult to debug chezmoi issues when using the verbose option gives no additional output.

Describe the solution you'd like

It would be great if the verbose option printed each file it was applying during a chezmoi apply.

Describe alternatives you've considered

I've considered attaching a debugger but haven't resorted to it yet.

Additional context

This is also in response to #3704 where I'm seeing some files applied (even encrypted files) and other files not applied.

Thank you, this is a great idea!

After a bit of experimentation, it's actually quite tricky to implement. The reason is that chezmoi's --verbose output can be fed into the user's custom pager, the user's custom diff command, and/or some combination of the above. In some cases, these take control of the user's terminal, with the result being various combinations of seemingly-stuck terminals, missing output, and invalid diffs.

A simpler solution is to include the name of the target that causes the error. This is implemented in #3711.