We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1ae3b6 commit ff2eff3Copy full SHA for ff2eff3
src/cred.rs
@@ -299,13 +299,19 @@ impl CredentialHelper {
299
300
if cmd.starts_with('!') {
301
self.commands.push(cmd[1..].to_string());
302
- } else if cmd.contains("/") || cmd.contains("\\") {
+ } else if is_absolute_path(cmd) {
303
self.commands.push(cmd.to_string());
304
} else {
305
self.commands.push(format!("git credential-{}", cmd));
306
}
307
308
309
+ fn is_absolute_path(path: &str) -> bool {
310
+ path.starts_with('/')
311
+ || path.starts_with('\\')
312
+ || cfg!(windows) && path.chars().nth(1).is_some_and(|x| x == ':')
313
+ }
314
+
315
fn exact_key(&self, name: &str) -> String {
316
format!("credential.{}.{}", self.url, name)
317
0 commit comments