Skip to content

Commit da53131

Browse files
committed
prevent errors when call_host is disabled
1 parent 9d1c5eb commit da53131

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

call_host.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,14 @@ export_func startpipe
243243

244244
# sends function to host, then listens for output, and provides exit code from function
245245
call_host(){
246+
if [ "$CALL_HOST_STATUS" != "enable" ]; then
247+
echo "call_host is disabled"
248+
return 1
249+
elif [ -z "$HOSTPIPE" ] || [ -z "$CONTPIPE" ] || [ -z "$EXITPIPE" ]; then
250+
echo "call_host pipes are missing"
251+
return 1
252+
fi
253+
246254
# disable ctrl+c to prevent "Interrupted system call"
247255
trap "" SIGINT
248256

0 commit comments

Comments
 (0)