File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def detect_network_isolation() -> None:
3939 cmd = network_isolation_cmd ()
4040 if os .name == "posix" :
4141 check = [* cmd , "true" ]
42- subprocess .check_call (check , stderr = subprocess .STDOUT )
42+ subprocess .check_output (check , stderr = subprocess .STDOUT )
4343
4444
4545class NetworkIsolationError (subprocess .CalledProcessError ):
Original file line number Diff line number Diff line change @@ -22,11 +22,18 @@ if [ "$#" -eq 0 ]; then
2222fi
2323
2424# bring loopback up
25- ip link set lo up
25+ if command -v ip 2>&1 > /dev/null; then
26+ ip link set lo up
27+ else
28+ echo " 'ip' command is missing, cannot bring up loopback device for $@ " >&2
29+ exit 2
30+ fi
2631
2732# set hostname to "localhost"
2833if command -v hostname 2>&1 > /dev/null; then
2934 hostname localhost
35+ else
36+ echo " 'hostname' command is missing, cannot set host name to 'localhost' for $@ " >&2
3037fi
3138
3239# replace with command
You can’t perform that action at this time.
0 commit comments