Skip to content

Commit 327c8b2

Browse files
committed
Stop mangling the python argument to virtualenv
Pass the value given by the user for the --python option directly through to virtualenv without trying to expand it. Change-Id: Ia65bea1777f1c69524cb5685f0eaeabc1f7f50fe Fixes: #255
1 parent a33c6f3 commit 327c8b2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tests/test_mkvirtualenv.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,23 +196,23 @@ test_mkvirtualenv_python_short_option () {
196196
typeset _save=$VIRTUALENVWRAPPER_VIRTUALENV
197197
VIRTUALENVWRAPPER_VIRTUALENV=echo
198198
output="$(mkvirtualenv -p python foo)"
199-
assertSame "--python=$(pwd)/python foo" "$output"
199+
assertSame "--python=python foo" "$output"
200200
VIRTUALENVWRAPPER_VIRTUALENV=$_save
201201
}
202202

203203
test_mkvirtualenv_python_long_option () {
204204
typeset _save=$VIRTUALENVWRAPPER_VIRTUALENV
205205
VIRTUALENVWRAPPER_VIRTUALENV=echo
206206
output="$(mkvirtualenv --python python foo)"
207-
assertSame "--python=$(pwd)/python foo" "$output"
207+
assertSame "--python=python foo" "$output"
208208
VIRTUALENVWRAPPER_VIRTUALENV=$_save
209209
}
210210

211211
test_mkvirtualenv_python_long_option_equal () {
212212
typeset _save=$VIRTUALENVWRAPPER_VIRTUALENV
213213
VIRTUALENVWRAPPER_VIRTUALENV=echo
214214
output="$(mkvirtualenv --python=python foo)"
215-
assertSame "--python=$(pwd)/python foo" "$output"
215+
assertSame "--python=python foo" "$output"
216216
VIRTUALENVWRAPPER_VIRTUALENV=$_save
217217
}
218218

virtualenvwrapper.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ function mkvirtualenv {
439439
else
440440
i=$(( $i + 1 ))
441441
interpreter="${in_args[$i]}"
442-
fi;
443-
interpreter="$(virtualenvwrapper_absolutepath "$interpreter")";;
442+
fi;;
444443
-r)
445444
i=$(( $i + 1 ));
446445
requirements="${in_args[$i]}";

0 commit comments

Comments
 (0)