Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/cred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,12 @@ impl CredentialHelper {
// If that fails then it's up to the user to put `sh` in path and make
// sure it works.
let mut c = Command::new("sh");
#[cfg(windows)]
{
use std::os::windows::process::CommandExt;
const CREATE_NO_WINDOW: u32 = 0x08000000;
c.creation_flags(CREATE_NO_WINDOW);
}
c.arg("-c")
.arg(&format!("{} get", cmd))
.stdin(Stdio::piped())
Expand All @@ -384,6 +390,12 @@ impl CredentialHelper {
debug!("`sh` failed to spawn: {}", e);
let mut parts = cmd.split_whitespace();
let mut c = Command::new(parts.next().unwrap());
#[cfg(windows)]
{
use std::os::windows::process::CommandExt;
const CREATE_NO_WINDOW: u32 = 0x08000000;
c.creation_flags(CREATE_NO_WINDOW);
}
for arg in parts {
c.arg(arg);
}
Expand Down