d0b29ff0b3544f6f52fa763d224a91b7b0a08ac2

Author
Ryan Greenblatt <greenblattryan@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

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`). 

Diff

 1diff --git a/plugins/pip/pip.plugin.zsh b/plugins/pip/pip.plugin.zsh
 2index 5539187e1adf1100c3ee9bd448e3f9ab03e7ce5c..aaae90185e40f45b3a25eb7d255b34945bccbe23 100644
 3--- a/plugins/pip/pip.plugin.zsh
 4+++ b/plugins/pip/pip.plugin.zsh
 5@@ -29,6 +29,7 @@ zsh-pip-cache-packages() {
 6   if [[ ! -f $ZSH_PIP_CACHE_FILE ]]; then
 7       echo -n "(...caching package index...)"
 8       tmp_cache=/tmp/zsh_tmp_cache
 9+      touch $tmp_cache
10       for index in $ZSH_PIP_INDEXES ; do
11           # well... I've already got two problems
12           curl -L $index 2>/dev/null | \