Centralize existence check for modules and plugins
This commit is contained in:
parent
6ecfc7adbe
commit
6bd19cff67
|
@ -43,7 +43,6 @@ assert_module_file() {
|
|||
local file=$1
|
||||
shift
|
||||
|
||||
assert_file_exist "$(readlink -m $file)"
|
||||
assert_module_or_plugin_file $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))
|
||||
|
|
|
@ -148,7 +148,6 @@ assert_plugin_file() {
|
|||
local file=$1
|
||||
shift
|
||||
|
||||
assert_file_exist "$(readlink -m $file)"
|
||||
assert_module_or_plugin_file $file
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue