From e83b70f28b974d8f7bf6a1e29392743952329cf2 Mon Sep 17 00:00:00 2001 From: Fabricio Biazzotto Date: Mon, 8 Apr 2019 17:39:54 -0300 Subject: pip: fix indexes URL (#6986) Fixes #6981. --- plugins/pip/pip.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/pip') diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh index d7236b02a..5539187e1 100644 --- a/plugins/pip/pip.plugin.zsh +++ b/plugins/pip/pip.plugin.zsh @@ -10,7 +10,7 @@ # "zsh-pip-clear-cache". ZSH_PIP_CACHE_FILE=~/.pip/zsh-cache -ZSH_PIP_INDEXES=(https://pypi.python.org/simple/) +ZSH_PIP_INDEXES=(https://pypi.org/simple/) zsh-pip-clear-cache() { rm $ZSH_PIP_CACHE_FILE @@ -31,7 +31,7 @@ zsh-pip-cache-packages() { tmp_cache=/tmp/zsh_tmp_cache for index in $ZSH_PIP_INDEXES ; do # well... I've already got two problems - curl $index 2>/dev/null | \ + curl -L $index 2>/dev/null | \ zsh-pip-clean-packages \ >> $tmp_cache done -- cgit v1.2.3-70-g09d2 From d0b29ff0b3544f6f52fa763d224a91b7b0a08ac2 Mon Sep 17 00:00:00 2001 From: Ryan Greenblatt Date: Sun, 9 Jun 2019 18:02:08 -0400 Subject: pip: fix no such file or directory error (#7916) Zsh may be configured such that ">>" will error if the file doesn't exist (`setopt noclobber`). --- plugins/pip/pip.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/pip') diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh index 5539187e1..aaae90185 100644 --- a/plugins/pip/pip.plugin.zsh +++ b/plugins/pip/pip.plugin.zsh @@ -29,6 +29,7 @@ zsh-pip-cache-packages() { if [[ ! -f $ZSH_PIP_CACHE_FILE ]]; then echo -n "(...caching package index...)" tmp_cache=/tmp/zsh_tmp_cache + touch $tmp_cache for index in $ZSH_PIP_INDEXES ; do # well... I've already got two problems curl -L $index 2>/dev/null | \ -- cgit v1.2.3-70-g09d2