Skip to content

Commit 6d273f1

Browse files
fix: container name extraction in healthcheck function
Remove carriage return characters from container name extraction.
1 parent 3074c4e commit 6d273f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎installer/sctl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function usage() {
4242

4343
function _healthcheck() {
4444
echo
45-
container_name=$(grep "container_name" $SQLBOT_RUNNING_BASE/docker-compose.yml | awk -F': ' '{print $2}')
45+
container_name=$(grep "container_name" "$SQLBOT_RUNNING_BASE/docker-compose.yml" | awk -F': ' '{print $2}' | tr -d '\r')
4646
sleep 1
4747
if [ -z '$(docker ps --filter "name=^$container_name$" -q)' ];then
4848
echo "未找到容器 $container_name。"
@@ -203,4 +203,4 @@ function main() {
203203
;;
204204
esac
205205
}
206-
main
206+
main

0 commit comments

Comments
 (0)