Skip to content

Commit d6ade8a

Browse files
committed
remove rudundant 'source' from cli
1 parent a37242f commit d6ade8a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

virtualenvwrapper.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,8 @@ function virtualenvwrapper_run_hook () {
7676
# First anything that runs directly from the plugin
7777
"$VIRTUALENVWRAPPER_PYTHON" -m virtualenvwrapper.hook_loader $HOOK_VERBOSE_OPTION "$@"
7878
# Now anything that wants to run inside this shell
79-
hook_name="$1"
80-
shift # get rid of hook name
8179
"$VIRTUALENVWRAPPER_PYTHON" -m virtualenvwrapper.hook_loader $HOOK_VERBOSE_OPTION \
82-
--source "${hook_name}_source" "$@" >>$TMPDIR/$$.hook
80+
--source "$@" >>$TMPDIR/$$.hook
8381
source $TMPDIR/$$.hook
8482
rm -f $TMPDIR/$$.hook
8583
}

virtualenvwrapper/hook_loader.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ def main():
6262
if not args:
6363
parser.error('Please specify the hook to run')
6464
hook = args[0]
65+
if options.sourcing:
66+
hook += '_source'
6567

6668
for ep in pkg_resources.iter_entry_points('virtualenvwrapper.%s' % hook):
6769
plugin = ep.load()

0 commit comments

Comments
 (0)