Skip to content

Commit cf73080

Browse files
committed
fix: bin/codeflare's use of apt needs sudo
1 parent e90a878 commit cf73080

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: bin/codeflare

+2-3
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,10 @@ if [ "$NODE" != "node" ] && [ ! -f ~/.codeflare ] && [ $(uname) = Linux ]; then
120120
if [ $(apt -qq list sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 | grep installed 2> /dev/null | wc -l) != 20 ]; then
121121
# it's also possible we didn't see these in the list, because we have an out-of-date package list
122122
# so apt update to refresh that, then recheck
123-
apt update
123+
sudo apt update || exit 1
124124
if [ $(apt -qq list sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 | grep installed 2> /dev/null | wc -l) != 20 ]; then
125125
# we really don't have them installed, so install them
126-
apt install -y sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2
127-
touch ~/.codeflare
126+
sudo apt install -y sudo curl libx11-6 libglib2.0-0 libx11-xcb1 libxcb-dri3-0 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxi6 libxtst6 libnss3 libatk1.0-0 libdrm2 libgbm1 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 && touch ~/.codeflare
128127
else
129128
touch ~/.codeflare
130129
fi

0 commit comments

Comments
 (0)