Skip to content

Commit 6855ca4

Browse files
author
helpermethod
committed
Add sdkman_selfupdate_feature flag to disable selfupdate functionality for Homebrew
1 parent 1f5e586 commit 6855ca4

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

app/views/install_beta.scala.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ echo "sdkman_curl_max_time=10" >> "$sdkman_config_file"
238238
echo "sdkman_debug_mode=false" >> "$sdkman_config_file"
239239
echo "sdkman_insecure_ssl=false" >> "$sdkman_config_file"
240240
echo "sdkman_rosetta2_compatible=false" >> "$sdkman_config_file"
241-
echo "sdkman_selfupdate_enable=true" >> "$sdkman_config_file"
241+
echo "sdkman_auto_update=true" >> "$sdkman_config_file"
242+
echo "sdkman_selfupdate_feature=true" >> "$sdkman_config_file"
242243

243244
echo "Download script archive..."
244245
curl --location --progress-bar "${SDKMAN_SERVICE}/broker/download/sdkman/install/${SDKMAN_VERSION}/${SDKMAN_PLATFORM}" > "$sdkman_zip_file"

app/views/install_stable.scala.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ echo "sdkman_curl_max_time=10" >> "$sdkman_config_file"
237237
echo "sdkman_debug_mode=false" >> "$sdkman_config_file"
238238
echo "sdkman_insecure_ssl=false" >> "$sdkman_config_file"
239239
echo "sdkman_rosetta2_compatible=false" >> "$sdkman_config_file"
240-
echo "sdkman_selfupdate_enable=true" >> "$sdkman_config_file"
240+
echo "sdkman_auto_update=true" >> "$sdkman_config_file"
241+
echo "sdkman_selfupdate_feature=true" >> "$sdkman_config_file"
241242

242243
echo "Download script archive..."
243244
curl --location --progress-bar "${SDKMAN_SERVICE}/broker/download/sdkman/install/${SDKMAN_VERSION}/${SDKMAN_PLATFORM}" > "$sdkman_zip_file"

app/views/selfupdate_beta.scala.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_debug_mode') ]]; then
140140
echo "sdkman_debug_mode=true" >> "$sdkman_config_file"
141141
fi
142142

143-
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_colour_enable') ]]; then
144-
echo "sdkman_colour_enable=true" >> "$sdkman_config_file"
143+
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_colour_enable|sdkman_auto_update') ]]; then
144+
echo "sdkman_auto_update=true" >> "$sdkman_config_file"
145145
fi
146146

147147
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_env') ]]; then
@@ -156,6 +156,10 @@ if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_checksum_enable') ]]; then
156156
echo "sdkman_checksum_enable=true" >> "$sdkman_config_file"
157157
fi
158158

159+
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_selfupdate_feature') ]]; then
160+
echo "sdkman_selfupdate_feature=true" >> "$sdkman_config_file"
161+
fi
162+
159163
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_complete') ]]; then
160164
if [ -z "$ZSH_VERSION" -a -z "$BASH_VERSION" ]; then
161165
echo "sdkman_auto_complete=false" >> "$sdkman_config_file"

app/views/selfupdate_stable.scala.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_answer') ]]; then
116116
echo "sdkman_auto_answer=false" >> "$sdkman_config_file"
117117
fi
118118

119-
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_selfupdate_enable') ]]; then
120-
echo "sdkman_selfupdate_enable=true" >> "$sdkman_config_file"
119+
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_colour_enable|sdkman_auto_update') ]]; then
120+
echo "sdkman_auto_update=true" >> "$sdkman_config_file"
121121
fi
122122

123123
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_insecure_ssl') ]]; then
@@ -152,6 +152,10 @@ if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_rosetta2_compatible') ]]; th
152152
echo "sdkman_rosetta2_compatible=false" >> "$sdkman_config_file"
153153
fi
154154

155+
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_selfupdate_feature') ]]; then
156+
echo "sdkman_selfupdate_feature=true" >> "$sdkman_config_file"
157+
fi
158+
155159
if [[ -z $(cat ${sdkman_config_file} | grep 'sdkman_auto_complete') ]]; then
156160
if [ -z "$ZSH_VERSION" -a -z "$BASH_VERSION" ]; then
157161
echo "sdkman_auto_complete=false" >> "$sdkman_config_file"

0 commit comments

Comments
 (0)