File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -578,13 +578,13 @@ echo username=c
578578 return ;
579579 } // shell scripts don't work on Windows
580580 let td = TempDir :: new ( ) . unwrap ( ) ;
581- let path = td. path ( ) . join ( "git-credential-script" ) ;
581+ let path = td. path ( ) . join ( "git-credential-some- script" ) ;
582582 File :: create ( & path)
583583 . unwrap ( )
584584 . write (
585585 br"\
586586#!/bin/sh
587- echo username=c
587+ echo username=$1
588588" ,
589589 )
590590 . unwrap ( ) ;
@@ -596,14 +596,14 @@ echo username=c
596596 env:: set_var ( "PATH" , & env:: join_paths ( paths) . unwrap ( ) ) ;
597597
598598 let cfg = test_cfg ! {
599- "credential.https://example.com.helper" => "script" ,
599+ "credential.https://example.com.helper" => "some- script \" value/with \\ slashes \" " ,
600600 "credential.helper" => "!f() { echo username=a; echo password=b; }; f"
601601 } ;
602602 let ( u, p) = CredentialHelper :: new ( "https://example.com/foo/bar" )
603603 . config ( & cfg)
604604 . execute ( )
605605 . unwrap ( ) ;
606- assert_eq ! ( u, "c " ) ;
606+ assert_eq ! ( u, "value/with \\ slashes " ) ;
607607 assert_eq ! ( p, "b" ) ;
608608 }
609609
You can’t perform that action at this time.
0 commit comments