feat(shell): throw errors on interactive commands (#4788)

This commit is contained in:
Robert Mcgregor
2025-09-25 07:17:12 +10:00
committed by GitHub
parent 9d40422e2d
commit bde47eb85d
+6
View File
@@ -122,6 +122,12 @@ pub fn configure_shell_command(
.stdin(Stdio::null())
.kill_on_drop(true)
.env("GOOSE_TERMINAL", "1")
.env("GIT_EDITOR", "sh -c 'echo \"Interactive Git commands are not supported in this environment.\" >&2; exit 1'")
.env("GIT_SEQUENCE_EDITOR", "sh -c 'echo \"Interactive Git commands are not supported in this environment.\" >&2; exit 1'")
.env("VISUAL", "sh -c 'echo \"Interactive editor not available in this environment.\" >&2; exit 1'")
.env("EDITOR", "sh -c 'echo \"Interactive editor not available in this environment.\" >&2; exit 1'")
.env("GIT_TERMINAL_PROMPT", "0")
.env("GIT_PAGER", "cat")
.args(&shell_config.args)
.arg(command);