You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] install.sh cannot resolve latest with wget only: LATEST_URL is undefined #1456
On current main (7de51a87a13f89de1084f07d9ded9c4603b4da9a), scripts/install.sh supports curl or wget, but resolve_version() cannot resolve the default latest version in the wget-only GitHub path.
Line 851 references $LATEST_URL. This variable is not initialized anywhere in the script, which enables set -eu. The expansion fails before wget runs, and installation exits with status 1.
Steps to Reproduce
The following exercises the actual installer function without downloading or installing anything. The script's final main invocation is removed in memory, and the downloader is stubbed to make the wget-only path deterministic.
The wget-only path resolves the GitHub release tag using the repository's /releases/latest URL, as the curl branch already does. The stubbed reproduction should print resolved=v1.2.3 and exit 0.
Actual Behavior
/bin/sh: line 851: LATEST_URL: unbound variable
❌ Could not determine the latest version. Set DWS_VERSION explicitly.
exit=1
Environment
Source: main at 7de51a87a13f89de1084f07d9ded9c4603b4da9a (2026-09-30).
Reproduction: macOS, /bin/sh, Node.js v22.23.1; no CLI build or DingTalk credentials required.
Scope: default latest, GitHub source, wget available and curl unavailable. Explicit DWS_VERSION avoids this resolver branch.
Additional Context
Replacing only "$LATEST_URL" in memory with "https://github.com/${REPO}/releases/latest" makes the same stubbed reproduction succeed. This confirms the undefined variable is the failure point; real wget/network redirect behavior is not covered by this isolated test.
Suggested regression coverage: latest-version resolution with curl unavailable, wget available, and no inherited LATEST_URL.
Activity
fix: resolve latest GitHub release with wget only
haofeng0705 commentedon Oct 16, 2026
Hi @dongyikuan919,感谢你提供清晰的定位和隔离复现。
这个未初始化变量问题已在 PR #1492 修正,并包含于正式版 v1.0.64。
LATEST_URL,在set -u下展开失败,尚未发出下载请求就退出。/releases/latestURL 解析版本,不再依赖该变量。install.sh,可显式指定版本安装:固定版本只跳过 latest 解析,不保证资产下载网络可达;自动切换 Gitee 也是另一条安装路径。
以上是基于发布记录及版本源码的静态分析判断,我们本次未在你的环境运行真实 wget 或完整安装验证。我们先按已发布修复关闭这个 Issue;如果使用最新脚本仍有问题,请继续回复系统/架构、wget 版本、脚本来源、完整命令及脱敏错误输出,我们会继续跟进。感谢反馈,欢迎继续交流。