File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ function small-repo-in-sandbox() {
61
61
62
62
function launch-git-daemon() {
63
63
local port=9418
64
- if nc -4z localhost " $port " ; then
64
+ if nc -z 127.0.0.1 " $port " ; then
65
65
echo " Port $port (IPv4) should not have been open before this test's run of the git daemon!" >&2
66
66
return 1
67
67
fi
68
- if nc -6z localhost " $port " ; then
68
+ if nc -z ::1 " $port " ; then
69
69
echo " Port $port (IPv6) should not have been open before this test's run of the git daemon!" >&2
70
70
return 1
71
71
fi
@@ -74,9 +74,10 @@ function launch-git-daemon() {
74
74
echo ' An instance of git-daemon seems to be running already!' >&2
75
75
return 1
76
76
fi
77
- git -c uploadpack.allowRefInWant=true daemon --verbose --base-path=. --export-all --user-path & > /dev/null &
77
+ git -c uploadpack.allowRefInWant=true \
78
+ daemon --verbose --base-path=. --export-all --user-path --listen=::1 & > /dev/null &
78
79
daemon_pid=$!
79
- while ! nc -z localhost " $port " ; do
80
+ while ! nc -z ::1 " $port " ; do
80
81
sleep 0.1
81
82
done
82
83
trap ' kill $daemon_pid' EXIT
You can’t perform that action at this time.
0 commit comments