mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
修复 shell 未定义变量错误
This commit is contained in:
+3
-3
@@ -451,9 +451,9 @@ handle_task_start() {
|
||||
run_task_before() {
|
||||
. $file_task_before "$@"
|
||||
|
||||
if [[ $task_before ]]; then
|
||||
if [[ ${task_before:=} ]]; then
|
||||
echo -e "执行前置命令\n"
|
||||
eval "$task_before" "$@"
|
||||
eval "${task_before%;}" "$@"
|
||||
echo -e "\n执行前置命令结束\n"
|
||||
fi
|
||||
}
|
||||
@@ -463,7 +463,7 @@ run_task_after() {
|
||||
|
||||
if [[ ${task_after:=} ]]; then
|
||||
echo -e "\n执行后置命令\n"
|
||||
eval "$task_after" "$@"
|
||||
eval "${task_after%;}" "$@"
|
||||
echo -e "\n执行后置命令结束"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user