oddlama / agenix-rekey

An agenix extension adding secret generation and automatic rekeying using a YubiKey or master-identity
MIT License
213 stars 18 forks source link

add --show-trace to agenix CLI #21

Closed LoganBarnett closed 5 months ago

LoganBarnett commented 5 months ago

This allows tracing errors that occur when running agenix. The actual error I've encountered is current immaterial because I believe it is resulting from other, experimental work. But there is need to debug this work, and the current output is unhelpful (just showing built-in functions with no context).

Other arguments are accumulated and passed along to the subcommand, so there should be no discernible change in existing behavior, including if they previously used --show-trace (assuming --show-trace is after the subcommand).

Note that the placement of --show-trace is important. If provided --show-trace before the subcommand, it applies to agenix itself. If provided after the subcommand, it applies to the subcommand. Some or all subcommands do not currently use --show-trace, but at the very least this will account for future use. The help text has made an attempt at explaining this.

LoganBarnett commented 5 months ago

With the exception of the PASS_THRU_ARGS=("") unbound variable issue (I commented on) the rest of these are totally doable.

oddlama commented 5 months ago

Looks good to me know, anything else you wanna add or can this be merged?

LoganBarnett commented 5 months ago

I think this is good. Sorry for the delay. I typed up the message and never sent it. Artifacts of stolen time :\