[Bug] deploy/global-images/start-memory-core.sh 在 POSIX locale 下报 ADMIN_KEY_FILE unbound variable

Open Beginner friendly
#1,065 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
bash
Domain
devops

Research direction

Start with deploy/global-images/start-memory-core.sh at line 175, then run deploy/global-images/start-all.sh under an unset or C/POSIX locale to reproduce the failure. Done means the memory-core container passes health checks and admin initialization completes without an ADMIN_KEY_FILE unbound-variable error.

Written by the indexing model from the issue text.

Description

OpenClaw Version | OpenClaw 版本

2026.3.13

Plugin Version | 插件版本

v2.0.1-beta.2

Operating System | 操作系统

macOS 14 (Darwin 24.5.0)

System Specification | 系统配置

Apple Silicon

Describe the bug | 问题描述

运行 deploy/global-images/start-all.sh 时,memory-core 容器已成功启动并通过健康检查,但脚本随后在 start-memory-core.sh 第 175 行中断:

start-memory-core.sh: line 175: ADMIN_KEY_FILE) unbound variable

根因:第 175 行字符串中 $ADMIN_KEY_FILE 后紧跟全角右括号 (UTF-8 字节 ef bc 89)。在 C/POSIX locale 下 bash 按单字节解析,把全角括号的字节拼进了变量名,导致 set -u 触发 unbound variable 错误。

To Reproduce | 复现步骤
  1. LC_ALL/LANG 未设置(或为 C)的环境下(如部分 CI、cron、剥离 locale 的 shell)
  2. 执行 cd deploy/global-images && ./start-all.sh
  3. memory-core 容器启动 healthy 后,脚本报 line 175: ADMIN_KEY_FILE) unbound variable 并退出
Expected behavior | 预期行为

脚本正常完成 admin 用户初始化,不受 locale 影响。

Error Logs / Screenshots | 报错日志/截图
[ok] memory-core 已启动 → http://localhost:8420/
/Users/marun/code/TencentCloud/TencentDB-Agent-Memory/deploy/global-images/start-memory-core.sh: line 175: ADMIN_KEY_FILE) unbound variable
Additional context | 补充信息

修复方式:改为 ${ADMIN_KEY_FILE})(加花括号界定变量名)。全目录已扫描,无其他 $VAR 后紧跟多字节字符的同类问题。

Dominant language
TypeScript
Stars
27k
Forks
2.6k
Avg merge
3d 12h
Merged PRs (30d)
21

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TencentCloud/TencentDB-Agent-Memory

All issues in TencentCloud/TencentDB-Agent-Memory

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.