mirror of
https://github.com/docker/docker-install.git
synced 2026-11-20 10:03:11 +03:00
prevent globbing when enabling/disabling rpm channels
I ran into this when I ran the script from within `/etc/yum.repos.d`:
+ sh -c 'dnf config-manager --set-disabled docker-ce-*'
Error: No matching repo to modify: docker-ce-staging.repo.
Took me a bit to understand why the script was failing, and then realized
the shell was expanding `docker-ce-*` to filenames in my current directory;
ls -l docker-ce-*
-rw-r--r--. 1 root root 2027 May 6 09:32 docker-ce-staging.repo
This patch quotes the channel name to prevent globbing.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -495,8 +495,8 @@ do_install() {
|
||||
$sh_c "$config_manager --add-repo $repo_file_url"
|
||||
|
||||
if [ "$CHANNEL" != "stable" ]; then
|
||||
$sh_c "$config_manager $disable_channel_flag docker-ce-*"
|
||||
$sh_c "$config_manager $enable_channel_flag docker-ce-$CHANNEL"
|
||||
$sh_c "$config_manager $disable_channel_flag 'docker-ce-*'"
|
||||
$sh_c "$config_manager $enable_channel_flag 'docker-ce-$CHANNEL'"
|
||||
fi
|
||||
$sh_c "$pkg_manager makecache"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user