Browse Source

Merge pull request #4259 from Mon-ius/master

fix a issue, when profile not end with newline
neil 3 years ago
parent
commit
be477d7ae3
1 changed files with 3 additions and 0 deletions
  1. 3 0
      acme.sh

+ 3 - 0
acme.sh

@@ -2257,6 +2257,9 @@ _setopt() {
   if [ ! -f "$__conf" ]; then
     touch "$__conf"
   fi
+  if [ -n "$(tail -c 1 <"$__conf")" ]; then
+    echo >>"$__conf"
+  fi
 
   if grep -n "^$__opt$__sep" "$__conf" >/dev/null; then
     _debug3 OK