Skip to content

Commit a784fc7

Browse files
authored
Merge pull request #429 from rust-lang/cargo-fix
Relax credential helper checks
2 parents e1d5921 + 2241f53 commit a784fc7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cred.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl CredentialHelper {
269269

270270
if cmd.starts_with('!') {
271271
self.commands.push(cmd[1..].to_string());
272-
} else if cmd.starts_with('/') || cmd.starts_with('\\') || cmd[1..].starts_with(":\\") {
272+
} else if cmd.contains("/") || cmd.contains("\\") {
273273
self.commands.push(cmd.to_string());
274274
} else {
275275
self.commands.push(format!("git credential-{}", cmd));
@@ -347,6 +347,7 @@ impl CredentialHelper {
347347
.stdin(Stdio::piped())
348348
.stdout(Stdio::piped())
349349
.stderr(Stdio::piped());
350+
debug!("executing credential helper {:?}", c);
350351
let mut p = match c.spawn() {
351352
Ok(p) => p,
352353
Err(e) => {
@@ -360,6 +361,7 @@ impl CredentialHelper {
360361
.stdin(Stdio::piped())
361362
.stdout(Stdio::piped())
362363
.stderr(Stdio::piped());
364+
debug!("executing credential helper {:?}", c);
363365
match c.spawn() {
364366
Ok(p) => p,
365367
Err(e) => {

0 commit comments

Comments
 (0)