feat(coding-agent/tools): enhanced bash execution environment with non-interactive defaults
- Enhanced bash execution environment with comprehensive non-interactive defaults for pagers, editors, package managers, and tooling to prevent command blocking and interactive prompts. - Updated interactive bash terminal UI label from 'InteractiveTerm' to 'Console' for improved clarity.
This commit is contained in:
@@ -196,7 +196,7 @@ class BashInteractiveOverlayComponent implements Component {
|
||||
: this.#state === "complete" && this.#exitCode === 0
|
||||
? getStateIcon("success", this.uiTheme)
|
||||
: getStateIcon("warning", this.uiTheme);
|
||||
const title = this.uiTheme.fg("accent", "InteractiveTerm");
|
||||
const title = this.uiTheme.fg("accent", "Console");
|
||||
const statusBadge = this.uiTheme.fg("dim", wrapBrackets(this.#stateText(), this.uiTheme));
|
||||
const prefix = `${statusIcon} ${title} `;
|
||||
const suffix = ` ${statusBadge}`;
|
||||
@@ -302,15 +302,47 @@ export async function runInteractiveBashPty(
|
||||
timeoutMs: options.timeoutMs,
|
||||
env: {
|
||||
...options.env,
|
||||
// Disable pagers so commands don't block on interactive views.
|
||||
PAGER: "cat",
|
||||
GIT_PAGER: "cat",
|
||||
MANPAGER: "cat",
|
||||
SYSTEMD_PAGER: "cat",
|
||||
BAT_PAGER: "cat",
|
||||
DELTA_PAGER: "cat",
|
||||
GH_PAGER: "cat",
|
||||
GLAB_PAGER: "cat",
|
||||
PSQL_PAGER: "cat",
|
||||
MYSQL_PAGER: "cat",
|
||||
AWS_PAGER: "",
|
||||
HOMEBREW_PAGER: "cat",
|
||||
LESS: "FRX",
|
||||
// Disable editor and terminal credential prompts.
|
||||
GIT_EDITOR: "true",
|
||||
VISUAL: "true",
|
||||
EDITOR: "true",
|
||||
GIT_TERMINAL_PROMPT: "0",
|
||||
SSH_ASKPASS: "/usr/bin/false",
|
||||
CI: "1",
|
||||
// Package manager defaults for unattended execution.
|
||||
npm_config_yes: "true",
|
||||
npm_config_update_notifier: "false",
|
||||
npm_config_fund: "false",
|
||||
npm_config_audit: "false",
|
||||
npm_config_progress: "false",
|
||||
PNPM_DISABLE_SELF_UPDATE_CHECK: "true",
|
||||
PNPM_UPDATE_NOTIFIER: "false",
|
||||
YARN_ENABLE_TELEMETRY: "0",
|
||||
YARN_ENABLE_PROGRESS_BARS: "0",
|
||||
// Cross-language/tooling non-interactive defaults.
|
||||
CARGO_TERM_PROGRESS_WHEN: "never",
|
||||
DEBIAN_FRONTEND: "noninteractive",
|
||||
PIP_NO_INPUT: "1",
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: "1",
|
||||
TF_INPUT: "0",
|
||||
TF_IN_AUTOMATION: "1",
|
||||
GH_PROMPT_DISABLED: "1",
|
||||
COMPOSER_NO_INTERACTION: "1",
|
||||
CLOUDSDK_CORE_DISABLE_PROMPTS: "1",
|
||||
},
|
||||
signal: options.signal,
|
||||
cols,
|
||||
|
||||
Reference in New Issue
Block a user