File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,22 @@ NC='\033[0m'
31
31
32
32
echo " "
33
33
34
- if sudo -n true 2> /dev/null; then
35
- sudo chown -R $USER : .
34
+ if command -v doas & > /dev/null; then
35
+ SUDO=" doas"
36
+ elif command -v sudo & > /dev/null; then
37
+ SUDO=" sudo"
38
+ else
39
+ echo " Neither sudo nor doas is available. Exiting."
40
+ exit 1
41
+ fi
42
+
43
+ if $SUDO -n true 2> /dev/null; then
44
+ $SUDO chown -R $USER : .
36
45
echo -e " ${BOLD} Get started with:${NC} cd {{ name }} && ./vendor/bin/sail up"
37
46
else
38
47
echo -e " ${BOLD} Please provide your password so we can make some final adjustments to your application's permissions.${NC} "
39
48
echo " "
40
- sudo chown -R $USER : .
49
+ $SUDO chown -R $USER : .
41
50
echo " "
42
51
echo -e " ${BOLD} Thank you! We hope you build something incredible. Dive in with:${NC} cd {{ name }} && ./vendor/bin/sail up"
43
52
fi
You can’t perform that action at this time.
0 commit comments