SC2162: read without -r mangle backslashes

This commit is contained in:
Jose Diaz-Gonzalez
2017-03-26 04:59:10 -06:00
parent ed7d5623ad
commit e2bbdc968d
2 changed files with 2 additions and 2 deletions

View File

@@ -367,7 +367,7 @@ get_cmd_from_procfile() {
if [[ -f $DOKKU_PROCFILE ]]; then
local line; local name; local command
while read line || [[ -n "$line" ]]; do
while read -r line || [[ -n "$line" ]]; do
if [[ -z "$line" ]] || [[ "$line" == "#"* ]]; then
continue
fi

View File

@@ -13,7 +13,7 @@ verify_ssh_key_file() {
declare desc="Test that public key is valid"
[[ -s ${DOKKU_ROOT}/.ssh/authorized_keys ]] || dokku_log_fail "No public keys found."
local key line=0
while read key ; do
while read -r key; do
line=$((line + 1))
ssh-keygen -l -f /dev/stdin <<< "$key" &> /dev/null || dokku_log_fail "${DOKKU_ROOT}/.ssh/authorized_keys line $line failed ssh-keygen check."
done <"${DOKKU_ROOT}/.ssh/authorized_keys"