Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ryanprior
Copy link
Contributor

Closes #104

Why

Some users prefer not to see shell tracing output from the xtrace option. This is more of a user preference than a requirement based on the task in question, so it makes sense to me to offer an environment variable that users can set for a specific command invocation or put in their .env to disable tracing for all commands if that's their preference.

What

  • Adds a new member to the Runner struct, trace
  • Sets trace based on the value of the XC_TRACE env variable upon runner instantiation. Specifically, a value of "false", "no", or "0" (or any uppercase variant thereof) disables tracing by setting trace = false.
  • Respects the trace preference by writing set -o xtrace only when not disabled.
  • Documents the env variable

@ryanprior ryanprior requested a review from joerdav as a code owner November 9, 2025 00:20
@joerdav joerdav merged commit 0b590b3 into joerdav:main Jan 5, 2026
3 checks passed
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.

Make xtrace optional

2 participants