Commits

Doug Hellmann committed b34dcc1

Do not create hooks for rmproject

There is no rmproject command, so it does not need hooks.

Fixes #203

Change-Id: I69f4bf032eef01cd5dbfe0e33df86b17a77cf198

Comments (0)

Files changed (3)

docs/source/history.rst

 - Updated test configuration so they work properly under Linux.
 - Resolve relative paths before storing the project directory
   reference in :ref:`command-setvirtualenvproject`. (:bbissue:`207`)
+- Do not create hooks for commands that don't exist. (:bbissue:`203`)
 
 4.1.1
 =====

tests/test_project.sh

 
 test_initialize() {
     source "$test_dir/../virtualenvwrapper.sh"
-    for hook in  premkproject postmkproject prermproject postrmproject
+    for hook in  premkproject postmkproject
     do
         assertTrue "Global $hook was not created" "[ -f $WORKON_HOME/$hook ]"
         assertTrue "Global $hook is not executable" "[ -x $WORKON_HOME/$hook ]"
     export VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME/hooks"
     mkdir -p "$VIRTUALENVWRAPPER_HOOK_DIR"
     source "$test_dir/../virtualenvwrapper.sh"
-    for hook in  premkproject postmkproject prermproject postrmproject
+    for hook in  premkproject postmkproject
     do
         assertTrue "Global $hook was not created" "[ -f $VIRTUALENVWRAPPER_HOOK_DIR/$hook ]"
         assertTrue "Global $hook is not executable" "[ -x $VIRTUALENVWRAPPER_HOOK_DIR/$hook ]"

virtualenvwrapper/project.py

      "and before it is activated."),
     ("postmkproject",
      "This hook is run after a new project is activated."),
-
-    # rmproject
-    ("prermproject",
-     "This hook is run before a project is deleted."),
-    ("postrmproject",
-     "This hook is run after a project is deleted."),
 ]