]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
fix shellcheck warnings
authorneil <github@neilpang.com>
Wed, 23 Nov 2022 13:33:29 +0000 (21:33 +0800)
committerneil <github@neilpang.com>
Wed, 23 Nov 2022 13:33:29 +0000 (21:33 +0800)
.github/workflows/shellcheck.yml
deploy/gitlab.sh
dnsapi/dns_dynv6.sh

index d628ea93ec7f916c9d1bac65214349ef3fae0619..9beb5489162d8742667a38f9760af7bd2f9d85ad 100644 (file)
@@ -26,7 +26,7 @@ jobs:
     - name: Install Shellcheck\r
       run: sudo apt-get install -y shellcheck\r
     - name: DoShellcheck\r
-      run: shellcheck -V  && shellcheck -e SC2181 **/*.sh && echo "shellcheck OK"\r
+      run: shellcheck -V  && shellcheck -e SC2181 -e SC2089 **/*.sh && echo "shellcheck OK"\r
 \r
   shfmt:\r
     runs-on: ubuntu-latest\r
index d8a93ad2b8a6f86cb69a493c61dc6e836353bf53..595b6d2048af1d50758aa91b5ec341b82b17c101 100644 (file)
@@ -67,7 +67,7 @@ gitlab_deploy() {
 
   error_response="error"
 
-  if test ${_response#*"$error_response"} != "$_response"; then
+  if test "${_response#*"$error_response"}" != "$_response"; then
     _err "Error in deploying certificate:"
     _err "$_response"
     return 1
index 739eccf90cb26a7c874d2f6249524ed89645ee21..90814b1bed1e36da3be734a5a8ac25df35dbcb73 100644 (file)
@@ -94,7 +94,7 @@ _get_domain() {
   _your_hosts="$(echo "$_your_hosts" | awk '/\./ {print $1}')"
   for l in $_your_hosts; do
     #echo "host: $l"
-    if test ${_full_domain#*"$l"} != "$_full_domain"; then
+    if test "${_full_domain#*"$l"}" != "$_full_domain"; then
       _record=${_full_domain%."$l"}
       _host=$l
       _debug "The host is $_host and the record $_record"