Skip to content

Commit b34dcc1

Browse files
committed
Do not create hooks for rmproject
There is no rmproject command, so it does not need hooks. Fixes #203 Change-Id: I69f4bf032eef01cd5dbfe0e33df86b17a77cf198
1 parent 8b95f34 commit b34dcc1

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

docs/source/history.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dev
1919
- Updated test configuration so they work properly under Linux.
2020
- Resolve relative paths before storing the project directory
2121
reference in :ref:`command-setvirtualenvproject`. (:bbissue:`207`)
22+
- Do not create hooks for commands that don't exist. (:bbissue:`203`)
2223

2324
4.1.1
2425
=====

tests/test_project.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ setUp () {
2222

2323
test_initialize() {
2424
source "$test_dir/../virtualenvwrapper.sh"
25-
for hook in premkproject postmkproject prermproject postrmproject
25+
for hook in premkproject postmkproject
2626
do
2727
assertTrue "Global $hook was not created" "[ -f $WORKON_HOME/$hook ]"
2828
assertTrue "Global $hook is not executable" "[ -x $WORKON_HOME/$hook ]"
@@ -33,7 +33,7 @@ test_initialize_hook_dir() {
3333
export VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME/hooks"
3434
mkdir -p "$VIRTUALENVWRAPPER_HOOK_DIR"
3535
source "$test_dir/../virtualenvwrapper.sh"
36-
for hook in premkproject postmkproject prermproject postrmproject
36+
for hook in premkproject postmkproject
3737
do
3838
assertTrue "Global $hook was not created" "[ -f $VIRTUALENVWRAPPER_HOOK_DIR/$hook ]"
3939
assertTrue "Global $hook is not executable" "[ -x $VIRTUALENVWRAPPER_HOOK_DIR/$hook ]"

virtualenvwrapper/project.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@
1919
"and before it is activated."),
2020
("postmkproject",
2121
"This hook is run after a new project is activated."),
22-
23-
# rmproject
24-
("prermproject",
25-
"This hook is run before a project is deleted."),
26-
("postrmproject",
27-
"This hook is run after a project is deleted."),
2822
]
2923

3024

0 commit comments

Comments
 (0)