summaryrefslogtreecommitdiff
path: root/plugins/salt
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2019-11-21 03:29:16 +0100
committerGitHub <noreply@github.com>2019-11-21 03:29:16 +0100
commit1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd (patch)
treecf629fdfe879eafbbd14350df71556d2179c37a0 /plugins/salt
parentb80b1a1e8b30e5f2a7c4977019cf56e72c434037 (diff)
downloadzsh-1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd.tar.gz
zsh-1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd.tar.bz2
zsh-1c98b9cc38d34647f1d6357919a0f4e1d5ebd4cd.zip
Remove current directory from sys.path in python invocations (#8408)
* Remove current directory from sys.path in python invocations
Diffstat (limited to 'plugins/salt')
-rw-r--r--plugins/salt/_salt2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/salt/_salt b/plugins/salt/_salt
index 10b782af4..78d8611d2 100644
--- a/plugins/salt/_salt
+++ b/plugins/salt/_salt
@@ -271,7 +271,7 @@ _salt_comp(){
fi
if _cache_invalid salt/salt_dir || ! _retrieve_cache salt/salt_dir; then
- salt_dir="${$(python2 -c 'import salt; print(salt.__file__);')%__init__*}"
+ salt_dir="${$(python2 -c 'import sys; del sys.path[0]; import salt; print(salt.__file__);')%__init__*}"
_store_cache salt/salt_dir salt_dir
fi
}