File tree Expand file tree Collapse file tree 1 file changed +24
-14
lines changed
Expand file tree Collapse file tree 1 file changed +24
-14
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- set -e
3+ set -eu
44
5- if ! command -v rye > /dev/null 2>&1
6- then
5+ : " ${GITHUB_ACTIONS:= } "
6+ : " ${RYE_INSTALL_OPTION:= ' --yes' } "
7+ : " ${RYE_VERSION:= ' latest' } "
8+
9+ install_rye () {
10+ curl -sSf https://rye-up.com/get | sh
11+ }
12+
13+ if [ -n " $GITHUB_ACTIONS " ]; then
14+ install_rye
15+ echo " $HOME /.rye/shims" >> " $GITHUB_PATH "
16+ elif ! command -v rye > /dev/null 2>&1 ; then
717 echo " rye is not installed."
818 printf " Do you want to install rye? (y/n) "
919 read -r REPLY
10- echo # move to a new line
11- case " $REPLY " in
12- [yY])
13- echo " Installing rye..."
14- curl -sSf https://rye-up.com/get | sh
15- echo " rye has been successfully installed."
16- ;;
17- * )
18- exit 1
19- ;;
20+ echo
21+ case " $REPLY " in
22+ [yY])
23+ echo " Installing rye..."
24+ install_rye
25+ echo " rye has been successfully installed."
26+ ;;
27+ * )
28+ exit 1
29+ ;;
2030 esac
2131else
22- echo " Rye is already installed."
32+ echo " rye is already installed."
2333fi
2434
2535exec rye sync
You can’t perform that action at this time.
0 commit comments