fix shellcheck issue with ssh-keys/user-auth
This commit is contained in:
1 parent
9aef528edc
commit
fb2c7af9e1
1 file changed
+4
-2
@@ -5,7 +5,9 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|||||||
check_ssh_keys_user() {
|
check_ssh_keys_user() {
|
||||||
declare desc="check user running ssh-keys"
|
declare desc="check user running ssh-keys"
|
||||||
local SSH_USER=$1 SSH_NAME=$2
|
local SSH_USER=$1 SSH_NAME=$2
|
||||||
[[ "$SSH_USER" != "root" && "$SSH_NAME" != *admin* ]] && dokku_log_fail "You must be root, or a dokku admin, to execute this command" || true
|
[[ "$SSH_USER" == "root" || "$SSH_NAME" == *admin* ]] || dokku_log_fail "You must be root, or a dokku admin, to execute this command"
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ "$3" == ssh-keys* ]] && check_ssh_keys_user "$@" || true
|
if [[ "$3" == ssh-keys* ]]; then
|
||||||
|
check_ssh_keys_user "$@"
|
||||||
|
fi
|
||||||
Reference in new issue
Block a user