Skip to content

[Bug] dws无法从高版本降级到低版本 #581

Closed

Description

@599218337

Describe the Bug

本地dws版本为 v1.0.47 想使用v.1.0.46版本

Steps to Reproduce

Image

Expected Behavior

预期结果是可以降级成功

Actual Behavior

实际是知道我想降级 但是检测到本地版本高于预期版本 没有执行

Environment

  • OS: [e.g., macOS 15.2, Ubuntu 24.04, Windows 11]
  • Architecture: [e.g., arm64, amd64]
  • CLI Version: [output of dws version]
  • Go Version (if building from source): [output of go version]

Additional Context

Add any other context about the problem here (logs, screenshots, etc.).

Activity

  1. haofeng0705 commented on Oct 12, 2026

    @haofeng0705
    Collaborator

    已核查,降级需要增加 --force:

    dws upgrade --version v1.0.46 --force

    默认情况下,upgrade 仅在目标版本高于当前版本时继续,因此截图中的命令会提示“已是最新版本”。--force 会跳过该检查,允许安装指定的旧版本。

    建议先预览,再确认执行:

    dws upgrade --version v1.0.46 --force --dry-run

    验证范围:在当前主线 2cc4ae522bcdceaea13ef4277265e5d5f96b9ba1 的隔离测试中,模拟当前版本 v1.0.47、目标版本 v1.0.46,未加 --force 时复现截图行为,加上后可进入独立二进制的降级预览。未实际执行完整下载安装;目标版本资源仍需可用。npm/pnpm/Homebrew 安装还需遵循对应包管理器的限制。

    已有 --force 入口可用于显式降级,此 issue 按上述使用方式说明关闭,本次未提交代码修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions