Skip to content

Commit

Permalink
git: Disable terminal prompt
Browse files Browse the repository at this point in the history
Fixes #100
  • Loading branch information
piegamesde committed Feb 25, 2025
1 parent f6cee04 commit 2fa2c4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ impl RemoteInfo {
/// Convenience wrapper around calling `git ls-remote`
async fn fetch_remote(args: &[&str]) -> Result<Vec<RemoteInfo>> {
let process = Command::new("git")
// Disable any interactive login attempts, failing gracefully instead
.env("GIT_TERMINAL_PROMPT", "0")
.arg("ls-remote")
.args(args)
.output()
Expand Down
2 changes: 2 additions & 0 deletions src/nix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ pub async fn nix_prefetch_git(
output.arg("--fetch-submodules");
}
let output = output
// Disable any interactive login attempts, failing gracefully instead
.env("GIT_TERMINAL_PROMPT", "0")
.arg(url)
.arg(git_ref.as_ref())
.output()
Expand Down

0 comments on commit 2fa2c4b

Please sign in to comment.