Skip to content

Implement scoped archive installs across platforms#30

Merged
Marc-André Moreau (mamoreau-devolutions) merged 2 commits intomasterfrom
windows-zip-package-installs
Mar 31, 2026
Merged

Implement scoped archive installs across platforms#30
Marc-André Moreau (mamoreau-devolutions) merged 2 commits intomasterfrom
windows-zip-package-installs

Conversation

@mamoreau-devolutions
Copy link
Copy Markdown
Contributor

@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) commented Mar 31, 2026

Summary

  • unify install, update, uninstall, and list around cross-platform --scope <user|machine> behavior
  • add self-managed Unix machine installs from the official PowerShell archives with one shared alias/bin directory per scope
  • keep Windows archive installs MSI-like where it makes sense, while scoping Microsoft Update out for now and using .exe-only aliases
  • add cross-platform smoke coverage plus README and demo updates for the scoped install model

Sample commands

multi-pwsh install 7.4
multi-pwsh install 7.5 --scope machine
multi-pwsh install 7.5 --scope machine --enable-psremoting
multi-pwsh list --scope all
pwsh-7 --version
pwsh-7.5 --version
multi-pwsh uninstall 7.5.5 --scope machine

--enable-psremoting is a Windows archive-install option; on macOS/Linux the scoped surface is intentionally narrower.

Machine-scoped install model

Machine-scoped installs remain self-managed by multi-pwsh: they use PowerShell archives, not MSI/Homebrew/apt/rpm/snap delegation. Each scope gets one stable alias/bin directory, so PATH only needs one entry per scope while exact versions remain side-by-side under the install root.

Windows

  • payload root: C:\Program Files\PowerShell
  • version directories: C:\Program Files\PowerShell\7.4.14, C:\Program Files\PowerShell\7.5.5, ...
  • shared alias directory: C:\Program Files\PowerShell\bin
  • alias forms: pwsh-7.exe, pwsh-7.4.exe, pwsh-7.4.14.exe
  • archive-friendly integration options supported: PATH, manifest registration, PSRemoting, telemetry opt-out, Explorer/file context menus

macOS

  • payload root: /usr/local/microsoft/powershell
  • version directories: /usr/local/microsoft/powershell/7.4.14, /usr/local/microsoft/powershell/7.5.5, ...
  • shared alias directory: /usr/local/bin
  • uses official .tar.gz archives
  • caller supplies elevation; multi-pwsh does not invoke sudo

Linux

  • payload root: /opt/microsoft/powershell
  • version directories: /opt/microsoft/powershell/7.4.14, /opt/microsoft/powershell/7.5.5, ...
  • shared alias directory: /usr/local/bin
  • uses official .tar.gz archives
  • caller supplies elevation; multi-pwsh does not invoke sudo

Behavior notes

  • user remains the default when --scope is omitted
  • list --scope all spans both scopes
  • when the same exact version exists in both scopes, uninstall/list flows can require explicit --scope to disambiguate
  • legacy values such as current-user and all-users are still accepted for compatibility, but the primary CLI surface is now user / machine

Verification

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets
  • cargo build --all-targets
  • cargo test --all-targets
  • dotnet build dotnet/bindings/Devolutions.PowerShell.SDK.Bindings.csproj
  • dotnet test dotnet/bindings/Devolutions.PowerShell.SDK.Bindings.csproj --no-build
  • GitHub Actions CI
  • GitHub Actions Smoke tests

- unify install, update, uninstall, and list around cross-platform user and machine scopes
- add self-managed Unix all-users archive installs with shared alias bins and ambiguity-aware routing
- scope unsupported MSI-only archive options out of the Windows flow and keep Windows aliases exe-only
- add cross-platform smoke tests for scoped installs and update docs and demos

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) merged commit 4923e31 into master Mar 31, 2026
14 checks passed
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) deleted the windows-zip-package-installs branch April 10, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant