Skip to content

Commit c049216

Browse files
bdwaltongitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 62b553c commit c049216

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: t/lib-credential.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,10 @@ helper_test_timeout() {
278278
'
279279
}
280280

281-
cat >askpass <<\EOF
282-
#!/bin/sh
281+
write_script askpass <<\EOF
283282
echo >&2 askpass: $*
284283
what=$(echo $1 | cut -d" " -f1 | tr A-Z a-z | tr -cd a-z)
285284
echo "askpass-$what"
286285
EOF
287-
chmod +x askpass
288286
GIT_ASKPASS="$PWD/askpass"
289287
export GIT_ASKPASS

0 commit comments

Comments
 (0)