Skip to content

Commit

Permalink
Merge pull request #429 from rust-lang/cargo-fix
Browse files Browse the repository at this point in the history
Relax credential helper checks
  • Loading branch information
alexcrichton authored Jun 7, 2019
2 parents e1d5921 + 2241f53 commit a784fc7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ impl CredentialHelper {

if cmd.starts_with('!') {
self.commands.push(cmd[1..].to_string());
} else if cmd.starts_with('/') || cmd.starts_with('\\') || cmd[1..].starts_with(":\\") {
} else if cmd.contains("/") || cmd.contains("\\") {
self.commands.push(cmd.to_string());
} else {
self.commands.push(format!("git credential-{}", cmd));
Expand Down Expand Up @@ -347,6 +347,7 @@ impl CredentialHelper {
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.stderr(Stdio::piped());
debug!("executing credential helper {:?}", c);
let mut p = match c.spawn() {
Ok(p) => p,
Err(e) => {
Expand All @@ -360,6 +361,7 @@ impl CredentialHelper {
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.stderr(Stdio::piped());
debug!("executing credential helper {:?}", c);
match c.spawn() {
Ok(p) => p,
Err(e) => {
Expand Down

0 comments on commit a784fc7

Please sign in to comment.