浏览代码

fix https://github.com/Neilpang/acme.sh/issues/2417

neilpang 6 年之前
父节点
当前提交
75191e7187
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      acme.sh

+ 5 - 2
acme.sh

@@ -5932,8 +5932,11 @@ _send_notify() {
   _send_err=0
   _send_err=0
   for _n_hook in $(echo "$_nhooks" | tr ',' " "); do
   for _n_hook in $(echo "$_nhooks" | tr ',' " "); do
     _n_hook_file="$(_findHook "" $_SUB_FOLDER_NOTIFY "$_n_hook")"
     _n_hook_file="$(_findHook "" $_SUB_FOLDER_NOTIFY "$_n_hook")"
-    _info "Found $_n_hook_file"
-
+    _info "Found $_n_hook_file for $_n_hook"
+    if [ -z "$_n_hook_file" ]; then
+      _err "Can not find the hook file for $_n_hook"
+      continue
+    fi
     if ! (
     if ! (
       if ! . "$_n_hook_file"; then
       if ! . "$_n_hook_file"; then
         _err "Load file $_n_hook_file error. Please check your api file and try again."
         _err "Load file $_n_hook_file error. Please check your api file and try again."