File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1714,10 +1714,12 @@ _hs_mk_pty() {
1714
1714
read -r
1715
1715
echo -e " >>> Cut & paste ${CDC} eval \"\$ (curl -SsfL ${_HSURL} )\" ${CN} "
1716
1716
1717
+ # Some systems no not allow pty allocation.
1718
+ # => Test if PTY allocation works and call exec therafter
1717
1719
if [ -n " $HS_PY " ]; then
1718
- " ${HS_PY:- python} " -c " import pty;" 2> /dev/null && exec " ${HS_PY:- python} " -c " import pty; pty.spawn('${SHELL:- sh} ')"
1720
+ " ${HS_PY:- python} " -c " import pty; pty.spawn([' ${SHELL :- sh} ', '-c' , 'true']) " 2> /dev/null && exec " ${HS_PY:- python} " -c " import pty; pty.spawn('${SHELL:- sh} ')"
1719
1721
elif command -v script > /dev/null; then
1720
- exec script -qc " ${SHELL:- sh} " /dev/null
1722
+ script -qc " ${SHELL :- sh} -c true " /dev/null && exec script -qc " ${SHELL:- sh} " /dev/null
1721
1723
fi
1722
1724
1723
1725
HS_ERR " Not found: python or script"
You can’t perform that action at this time.
0 commit comments