aboutsummaryrefslogtreecommitdiff
path: root/otp.bash
diff options
context:
space:
mode:
Diffstat (limited to 'otp.bash')
-rwxr-xr-xotp.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/otp.bash b/otp.bash
index 15bd012..c62501a 100755
--- a/otp.bash
+++ b/otp.bash
@@ -268,7 +268,7 @@ cmd_otp_append() {
[[ -f $passfile ]] || die "Passfile not found"
local existing contents=""
- while IFS= read -r line; do
+ while IFS= read -r line || [ -n "$line" ]; do
[[ -z "$existing" && "$line" == otpauth://* ]] && existing="$line"
[[ -n "$contents" ]] && contents+=$'\n'
contents+="$line"