fix(install): do not kill PowerShell host under 'irm | iex' #1

已合并
fourbroad 于 2026-07-02 09:54:18 +08:00 将 1 次代码提交从 workflow/bugfix/install-exit-kills-iex-host合并至 main
所有者

The Windows installer used 'exit' inside Install-Octopus. When run via
'irm | iex' (the documented one-liner), there is no script scope, so
'exit' terminates the entire PowerShell host process and closes the terminal
window instead of just ending the install. Most users hit this via the
'already installed' branch (exit 0).

Replace 'exit' with:

  • 'return' for the success (already-installed) path
  • 'throw' for error paths (still non-zero exit when run as .\install.ps1
    in CI; prints the error and returns to the prompt under iex)

Add tests/test.ps1 as a regression guard (source-verification + a behavioral
test proving iex no longer terminates the host).

The Windows installer used 'exit' inside Install-Octopus. When run via 'irm <url> | iex' (the documented one-liner), there is no script scope, so 'exit' terminates the entire PowerShell host process and closes the terminal window instead of just ending the install. Most users hit this via the 'already installed' branch (exit 0). Replace 'exit' with: - 'return' for the success (already-installed) path - 'throw' for error paths (still non-zero exit when run as .\install.ps1 in CI; prints the error and returns to the prompt under iex) Add tests/test.ps1 as a regression guard (source-verification + a behavioral test proving iex no longer terminates the host).
fourbroad 于 2026-07-02 09:54:14 +08:00 推送 1 个提交
The Windows installer used 'exit' inside Install-Octopus. When run via
'irm <url> | iex' (the documented one-liner), there is no script scope, so
'exit' terminates the entire PowerShell host process and closes the terminal
window instead of just ending the install. Most users hit this via the
'already installed' branch (exit 0).

Replace 'exit' with:
  - 'return' for the success (already-installed) path
  - 'throw' for error paths (still non-zero exit when run as .\install.ps1
    in CI; prints the error and returns to the prompt under iex)

Add tests/test.ps1 as a regression guard (source-verification + a behavioral
test proving iex no longer terminates the host).
fourbroad 于 2026-07-02 09:54:18 +08:00 合并提交 e79718a5fb 到 main
fourbroad 于 2026-07-02 09:54:55 +08:00 删除分支 workflow/bugfix/install-exit-kills-iex-host
登录 并参与到对话中。
未指定评审人
未选择标签
1 名参与者
通知
截止日期
未设置截止日期。
依赖工单

未设置依赖工单。

引用:Octopus/release#1