mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
t/lib-credential: use write_script
Use write_script to create the helper "askpass" script, instead of hand-creating it with hardcoded "#!/bin/sh" to make sure we use the shell the user told us to use. Signed-off-by: Ben Walton <bdwalton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
62b553cdd6
commit
c049216fdf
|
@ -278,12 +278,10 @@ helper_test_timeout() {
|
||||||
'
|
'
|
||||||
}
|
}
|
||||||
|
|
||||||
cat >askpass <<\EOF
|
write_script askpass <<\EOF
|
||||||
#!/bin/sh
|
|
||||||
echo >&2 askpass: $*
|
echo >&2 askpass: $*
|
||||||
what=$(echo $1 | cut -d" " -f1 | tr A-Z a-z | tr -cd a-z)
|
what=$(echo $1 | cut -d" " -f1 | tr A-Z a-z | tr -cd a-z)
|
||||||
echo "askpass-$what"
|
echo "askpass-$what"
|
||||||
EOF
|
EOF
|
||||||
chmod +x askpass
|
|
||||||
GIT_ASKPASS="$PWD/askpass"
|
GIT_ASKPASS="$PWD/askpass"
|
||||||
export GIT_ASKPASS
|
export GIT_ASKPASS
|
||||||
|
|
Loading…
Reference in a new issue