fix: add missing awk to get number of lines in key file
This commit is contained in:
@@ -28,7 +28,7 @@ add_keys() {
|
||||
dokku_log_fail "Empty key was specified"
|
||||
fi
|
||||
|
||||
local count="$(wc -l "$KEY_FILE")"
|
||||
local count="$(wc -l "$KEY_FILE" | awk '{ print $1; }')"
|
||||
[[ "$count" -eq 1 ]] || dokku_log_fail "Too many keys provided, set one per invocation of dokku ssh-keys:add <NAME> <KEY_FILE>"
|
||||
ssh-keygen -lf "$KEY_FILE" &>/dev/null || dokku_log_fail "Key specified in is not a valid ssh public key"
|
||||
create_ssh_key_file
|
||||
|
||||
Reference in New Issue
Block a user