mirror of
https://github.com/docker/docker-install.git
synced 2026-11-20 10:03:11 +03:00
prevent bare "=" as version
Make sure both pkg_version and cli_pkg_version are only set on success to prevent them containing a bare "=", which we were stripping later on. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
1 file changed
+6
-3
+6
-3
@@ -609,15 +609,18 @@ do_install() {
|
||||
if version_gte "18.09"; then
|
||||
search_command="apt-cache madison docker-ce-cli | grep '$pkg_pattern' | head -1 | awk '{\$1=\$1};1' | cut -d' ' -f 3"
|
||||
echo "INFO: $search_command"
|
||||
cli_pkg_version="=$($sh_c "$search_command")"
|
||||
cli_pkg_version="$($sh_c "$search_command")"
|
||||
if [ -n "$cli_pkg_version" ]; then
|
||||
cli_pkg_version="=$cli_pkg_version"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
(
|
||||
pkgs="docker-ce${pkg_version%=}"
|
||||
pkgs="docker-ce${pkg_version}"
|
||||
if version_gte "18.09"; then
|
||||
# older versions didn't ship the cli and containerd as separate packages
|
||||
pkgs="$pkgs docker-ce-cli${cli_pkg_version%=} containerd.io"
|
||||
pkgs="$pkgs docker-ce-cli${cli_pkg_version} containerd.io"
|
||||
fi
|
||||
if version_gte "20.10"; then
|
||||
pkgs="$pkgs docker-compose-plugin docker-ce-rootless-extras$pkg_version"
|
||||
|
||||
Reference in new issue
Block a user