Commits

Doug Hellmann  committed e356207

remove rudundant 'source' from cli

  • Participants
  • Parent commits 5f6710e

Comments (0)

Files changed (2)

File virtualenvwrapper.sh

     # First anything that runs directly from the plugin
     "$VIRTUALENVWRAPPER_PYTHON" -m virtualenvwrapper.hook_loader $HOOK_VERBOSE_OPTION "$@"
     # Now anything that wants to run inside this shell
-    hook_name="$1"
-    shift # get rid of hook name
     "$VIRTUALENVWRAPPER_PYTHON" -m virtualenvwrapper.hook_loader $HOOK_VERBOSE_OPTION \
-        --source "${hook_name}_source" "$@" >>$TMPDIR/$$.hook
+        --source "$@" >>$TMPDIR/$$.hook
     source $TMPDIR/$$.hook
     rm -f $TMPDIR/$$.hook
 }

File virtualenvwrapper/hook_loader.py

     if not args:
         parser.error('Please specify the hook to run')
     hook = args[0]
+    if options.sourcing:
+        hook += '_source'
 
     for ep in pkg_resources.iter_entry_points('virtualenvwrapper.%s' % hook):
         plugin = ep.load()