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.
72
72
Report bugs via the `bug tracker on BitBucket
73
73
<http://bitbucket.org/dhellmann/virtualenvwrapper/> `__.
74
74
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
+
75
85
=======
76
86
License
77
87
=======
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Release History
8
8
- Integrate Manuel Kaufmann's patch to unset GREP_OPTIONS before
9
9
calling grep. Resolves :bbissue: `51 `.
10
10
- Escape ``$ `` in regex to resolve :bbissue: `53 `.
11
+ - Escape ``rm `` to avoid issues with aliases and resolve
12
+ :bbissue: `50 `.
11
13
12
14
2.2
13
15
Original file line number Diff line number Diff line change @@ -212,6 +212,16 @@ issues and features.
212
212
Report bugs via the `bug tracker on BitBucket
213
213
<http://bitbucket.org/dhellmann/virtualenvwrapper/> `__.
214
214
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
+
215
225
=======
216
226
License
217
227
=======
Original file line number Diff line number Diff line change @@ -29,6 +29,16 @@ test_remove () {
29
29
assertFalse " [ -d $WORKON_HOME /deleteme ]"
30
30
}
31
31
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
+
32
42
test_no_such_env () {
33
43
assertFalse " [ -d $WORKON_HOME /deleteme ]"
34
44
assertTrue " rmvirtualenv deleteme"
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ virtualenvwrapper_tempfile () {
106
106
echo " ERROR: virtualenvwrapper could not create a temporary file name." 1>&2
107
107
return 1
108
108
fi
109
- trap " rm -f '$file ' >/dev/null 2>&1" EXIT
109
+ trap " \ rm -f '$file ' >/dev/null 2>&1" EXIT
110
110
echo $file
111
111
return 0
112
112
}
@@ -131,7 +131,7 @@ virtualenvwrapper_run_hook () {
131
131
fi
132
132
source " $hook_script "
133
133
fi
134
- rm -f " $hook_script " > /dev/null 2>&1
134
+ \ r m -f " $hook_script " > /dev/null 2>&1
135
135
return $result
136
136
}
137
137
@@ -223,7 +223,7 @@ rmvirtualenv () {
223
223
return 1
224
224
fi
225
225
virtualenvwrapper_run_hook " pre_rmvirtualenv" " $env_name "
226
- rm -rf " $env_dir "
226
+ \ r m -rf " $env_dir "
227
227
virtualenvwrapper_run_hook " post_rmvirtualenv" " $env_name "
228
228
}
229
229
You can’t perform that action at this time.
0 commit comments