Centralize existence check for modules and plugins

This commit is contained in:
Jason Tedor 2016-03-17 22:34:33 -04:00
parent 6ecfc7adbe
commit 6bd19cff67
3 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,6 @@ assert_module_file() {
local file=$1
shift
assert_file_exist "$(readlink -m $file)"
assert_module_or_plugin_file $file
}

View File

@ -197,6 +197,8 @@ assert_module_or_plugin_file() {
local file=$1
shift
assert_file_exist "$(readlink -m $file)"
# config files should not be executable and otherwise use the user
# file-creation mask
expected_file_privileges=$((0777 & ~$(sudo -E -u $ESPLUGIN_COMMAND_USER sh -c umask) & ~0111))

View File

@ -148,7 +148,6 @@ assert_plugin_file() {
local file=$1
shift
assert_file_exist "$(readlink -m $file)"
assert_module_or_plugin_file $file
}