Skip to content

Commit 093dfd7

Browse files
authored
fix(installer): check installer mode from input (#1594)
1 parent 14cc30e commit 093dfd7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: build/docker/tools/tke-installer/install.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ function start_installer() {
182182
}
183183

184184
function start_registry() {
185-
result=$(echo $@ | grep "\-\-upgrade")
186-
if [[ "$result" != "" ]];then
185+
echo "Step.6 start regisry [in process]"
186+
checkupgrade="--upgrade"
187+
if [[ $@ =~ $checkupgrade ]]; then
187188
echo "Step.6 upgrade will not start local registry"
188189
echo "Step.6 start registry [skip]"
189190
else
190-
echo "Step.6 start regisry [in process]"
191191
mkdir -p $REGISTRY_DIR
192-
nerdctl run $RegistryHTTPOptions "tkestack/registry-${ARCH}:$REGISTRY_VERSION" $@
193-
nerdctl run $RegistryHTTPSOptions "tkestack/registry-${ARCH}:$REGISTRY_VERSION" $@
192+
nerdctl run $RegistryHTTPOptions "tkestack/registry-${ARCH}:$REGISTRY_VERSION"
193+
nerdctl run $RegistryHTTPSOptions "tkestack/registry-${ARCH}:$REGISTRY_VERSION"
194194
echo "Step.6 start registry [done]"
195195
fi
196196
}

0 commit comments

Comments
 (0)