Skip to content

Commit fdf36a6

Browse files
committed
use typeset instead of local and provide attribution for the original fix
1 parent f094391 commit fdf36a6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/en/history.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Release History
33
===============
44

5+
dev
6+
7+
- Make ``project_dir`` a local variable so that
8+
:ref:`command-cdproject` does not interfere with other variables
9+
the user might have set. (contributed by :bbuser:`slackorama`)
10+
511
3.1
612

713
- Fix a problem with activation hooks when associating a new

virtualenvwrapper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ function cdproject {
918918
virtualenvwrapper_verify_active_environment || return 1
919919
if [ -f "$VIRTUAL_ENV/$VIRTUALENVWRAPPER_PROJECT_FILENAME" ]
920920
then
921-
local project_dir=$(cat "$VIRTUAL_ENV/$VIRTUALENVWRAPPER_PROJECT_FILENAME")
921+
typeset project_dir=$(cat "$VIRTUAL_ENV/$VIRTUALENVWRAPPER_PROJECT_FILENAME")
922922
if [ ! -z "$project_dir" ]
923923
then
924924
cd "$project_dir"

0 commit comments

Comments
 (0)