1. Doug Hellmann
  2. virtualenvwrapper

Commits

Doug Hellmann  committed d6ade8a

remove rudundant 'source' from cli

  • Participants
  • Parent commits a37242f
  • Branches master

Comments (0)

Files changed (2)

File virtualenvwrapper.sh

View file
  • Ignore whitespace
     # 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

View file
  • Ignore whitespace
     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()