File size: 420 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#!/usr/bin/env bash
flow version > /dev/null 2>&1
uses_global_flow=$?
yarn flow version > /dev/null 2>&1
uses_yarn=$?
npm run flow version > /dev/null 2>&1
uses_npm=$?
if [ $uses_global_flow -eq 0 ]; then
flow
elif [ $uses_yarn -eq 0 ]; then
yarn flow
elif [ $uses_npm -eq 0 ]; then
npm run flow
else
echo "Error! Neither yarn nor npm provide flow. Consider running yarn install or npm install"
exit 1
fi
|