Commit b3c57860937a9576a74843350e2173510c0724a8
Committed by
Daniela Feitosa
1 parent
74aa21f6
Exists in
staging
and in
42 other branches
Test for directory existence before removing it
(ActionItem1987)
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
script/noosfero-plugins
| ... | ... | @@ -89,7 +89,7 @@ _disable(){ |
| 89 | 89 | plugins_public_dir="$NOOSFERO_DIR/public/plugins" |
| 90 | 90 | if [ -h "$target" ]; then |
| 91 | 91 | rm "$target" |
| 92 | - rm "$plugins_public_dir/$plugin" | |
| 92 | + test -h "$plugins_public_dir/$plugin" && rm "$plugins_public_dir/$plugin" | |
| 93 | 93 | _say "$plugin disabled" |
| 94 | 94 | else |
| 95 | 95 | _say "$plugin already disabled" | ... | ... |