feat: allow plugin:help and plugin:list subcommands to be run without root

This commit is contained in:
Jose Diaz-Gonzalez
2017-03-12 21:46:58 -06:00
parent 30bf228dc9
commit 3c5335056c

2
dokku
View File

@@ -56,7 +56,7 @@ if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ ! $1 == "ssh-keys:
exit $?
fi
if [[ $(id -un) != "root" && $1 =~ ^plugin:.* ]] || [[ $(id -un) != "root" && $1 == "ssh-keys:add" ]]; then
if [[ $(id -un) != "root" && $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $(id -un) != "root" && $1 == "ssh-keys:add" ]]; then
dokku_log_fail "This command must be run as root"
fi