mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Move GIT_TERMINAL_PROMPT
to env vars (#11789)
This commit is contained in:
parent
bace1a58c9
commit
b180fe99b4
2 changed files with 9 additions and 3 deletions
|
@ -578,9 +578,10 @@ fn fetch_with_cli(
|
|||
disable_ssl: bool,
|
||||
) -> Result<()> {
|
||||
let mut cmd = ProcessBuilder::new(GIT.as_ref()?);
|
||||
// Fix for https://github.com/astral-sh/uv/issues/5107.
|
||||
// Interactive prompts via GUI like SSH_ASKPASS still work
|
||||
cmd.env("GIT_TERMINAL_PROMPT", "0");
|
||||
// Disable interactive prompts in the terminal, as they'll be erased by the progress bar
|
||||
// animation and the process will "hang". Interactive prompts via the GUI like `SSH_ASKPASS`
|
||||
// are still usable.
|
||||
cmd.env(EnvVars::GIT_TERMINAL_PROMPT, "0");
|
||||
|
||||
cmd.arg("fetch");
|
||||
if tags {
|
||||
|
|
|
@ -473,6 +473,11 @@ impl EnvVars {
|
|||
#[attr_hidden]
|
||||
pub const GIT_SSL_NO_VERIFY: &'static str = "GIT_SSL_NO_VERIFY";
|
||||
|
||||
/// Disable interactive git prompts in terminals, e.g., for credentials. Does not disable
|
||||
/// GUI prompts.
|
||||
#[attr_hidden]
|
||||
pub const GIT_TERMINAL_PROMPT: &'static str = "GIT_TERMINAL_PROMPT";
|
||||
|
||||
/// Used in tests for better git isolation.
|
||||
///
|
||||
/// For example, we run some tests in ~/.local/share/uv/tests.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue