Diff
1diff --git a/CHANGELOG.rst b/CHANGELOG.rst
2index c23ec8c60ff29872625069bd9b945a906aa0b1a8..cc3adc70f53cf9f08e1f10b2055c42c74b7b2375 100644
3--- a/CHANGELOG.rst
4+++ b/CHANGELOG.rst
5@@ -1,6 +1,10 @@
6 Changelog
7 =========
8
9+1.10.1
10+------
11+* Fix minor bug where variables would leak into user's environment
12+
13 1.10.0
14 ------
15 * Scan for requirements files recursively when setting up a virtualenv (#88 - fix by @nrc)
16diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
17index f152273fb1aeea42d82906dd41c595fe761aeb25..54a2e6b05b930fab1a6a38571a254d18f2a48be2 100644
18--- a/autoswitch_virtualenv.plugin.zsh
19+++ b/autoswitch_virtualenv.plugin.zsh
20@@ -1,4 +1,4 @@
21-export AUTOSWITCH_VERSION='1.10.0'
22+export AUTOSWITCH_VERSION='1.10.1'
23
24 RED="\e[31m"
25 GREEN="\e[32m"
26@@ -27,7 +27,7 @@ function _virtual_env_dir() {
27
28
29 function _python_version() {
30- PYTHON_BIN="$1"
31+ local PYTHON_BIN="$1"
32 if [[ -f "$PYTHON_BIN" ]] then
33 # For some reason python --version writes to stderr
34 printf "%s" "$($PYTHON_BIN --version 2>&1)"
35@@ -98,6 +98,8 @@ function _check_venv_path()
36 function check_venv()
37 {
38 local SWITCH_TO=""
39+ local file_owner
40+ local file_permissions
41
42 # Get the .venv file, scanning parent directories
43 local venv_path=$(_check_venv_path "$PWD")
44@@ -190,7 +192,7 @@ function mkvenv()
45 printf "Creating ${PURPLE}%s${NONE} virtualenv\n" "$venv_name"
46
47 # Copy parameters variable so that we can mutate it
48- params=("${@[@]}")
49+ local params=("${@[@]}")
50
51 if [[ -n "$AUTOSWITCH_DEFAULT_PYTHON" && ${params[(I)--python*]} -eq 0 ]]; then
52 params+="--python=$AUTOSWITCH_DEFAULT_PYTHON"
53@@ -237,6 +239,7 @@ function install_requirements() {
54 fi
55
56 setopt nullglob
57+ local requirements
58 for requirements in **/*requirements.txt
59 do
60 printf "Found a ${PURPLE}%s${NORMAL} file. Install? [y/N]: " "$requirements"