File tree Expand file tree Collapse file tree 5 files changed +35
-3
lines changed Expand file tree Collapse file tree 5 files changed +35
-3
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,16 @@ issues and features.
7272Report bugs via the `bug tracker on BitBucket
7373<http://bitbucket.org/dhellmann/virtualenvwrapper/> `__.
7474
75+ Shell Aliases
76+ =============
77+
78+ Since virtualenvwrapper is largely a shell script, it uses shell
79+ commands for a lot of its actions. If your environment makes heavy
80+ use of shell aliases or other customizations, you may encounter
81+ issues. Before reporting bugs in the bug tracker, please test
82+ *without * your aliases enabled. If you can identify the alias causing
83+ the problem, that will help make virtualenvwrapper more robust.
84+
7585=======
7686License
7787=======
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Release History
88 - Integrate Manuel Kaufmann's patch to unset GREP_OPTIONS before
99 calling grep. Resolves :bbissue: `51 `.
1010 - Escape ``$ `` in regex to resolve :bbissue: `53 `.
11+ - Escape ``rm `` to avoid issues with aliases and resolve
12+ :bbissue: `50 `.
1113
12142.2
1315
Original file line number Diff line number Diff line change @@ -212,6 +212,16 @@ issues and features.
212212Report bugs via the `bug tracker on BitBucket
213213<http://bitbucket.org/dhellmann/virtualenvwrapper/> `__.
214214
215+ Shell Aliases
216+ =============
217+
218+ Since virtualenvwrapper is largely a shell script, it uses shell
219+ commands for a lot of its actions. If your environment makes heavy
220+ use of shell aliases or other customizations, you may encounter
221+ issues. Before reporting bugs in the bug tracker, please test
222+ *without * your aliases enabled. If you can identify the alias causing
223+ the problem, that will help make virtualenvwrapper more robust.
224+
215225=======
216226License
217227=======
Original file line number Diff line number Diff line change @@ -29,6 +29,16 @@ test_remove () {
2929 assertFalse " [ -d $WORKON_HOME /deleteme ]"
3030}
3131
32+ test_rm_aliased () {
33+ mkvirtualenv " deleteme"
34+ deactivate
35+ alias rm=' rm -i'
36+ set -x
37+ rmvirtualenv " deleteme"
38+ set +x
39+ unalias rm
40+ }
41+
3242test_no_such_env () {
3343 assertFalse " [ -d $WORKON_HOME /deleteme ]"
3444 assertTrue " rmvirtualenv deleteme"
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ virtualenvwrapper_tempfile () {
106106 echo " ERROR: virtualenvwrapper could not create a temporary file name." 1>&2
107107 return 1
108108 fi
109- trap " rm -f '$file ' >/dev/null 2>&1" EXIT
109+ trap " \ rm -f '$file ' >/dev/null 2>&1" EXIT
110110 echo $file
111111 return 0
112112}
@@ -131,7 +131,7 @@ virtualenvwrapper_run_hook () {
131131 fi
132132 source " $hook_script "
133133 fi
134- rm -f " $hook_script " > /dev/null 2>&1
134+ \ r m -f " $hook_script " > /dev/null 2>&1
135135 return $result
136136}
137137
@@ -223,7 +223,7 @@ rmvirtualenv () {
223223 return 1
224224 fi
225225 virtualenvwrapper_run_hook " pre_rmvirtualenv" " $env_name "
226- rm -rf " $env_dir "
226+ \ r m -rf " $env_dir "
227227 virtualenvwrapper_run_hook " post_rmvirtualenv" " $env_name "
228228}
229229
You can’t perform that action at this time.
0 commit comments