Devolutions / Devolutions/UniGetUI

[BUG] Automatic restart after dependency installation crashes on macOS because powershell.exe is used

Open
#5,237 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
26.1k
Forks
924
Avg merge
15h 52m
Merged PRs (30d)
52

Description

### Please confirm these before moving forward

- [x] I searched for an existing issue and did not find a matching report.
- [x] I reproduced this with the latest installed release, UniGetUI 2026.2.7.
- [x] This report describes a bug.

### Environment

- UniGetUI: 2026.2.7, build 107
- macOS: 26.5.2 (25F84)
- Architecture: ARM64
- Hardware: MacBook Air M5 (Mac17,4)
- PowerShell: 7.6.4 installed as `/opt/homebrew/bin/pwsh`

### Description

After UniGetUI installs a missing package-manager dependency, it offers to restart itself. Selecting the restart option closes UniGetUI, but the application is not relaunched. On the next manual launch, UniGetUI reports the exception from the failed restart.

This is reproducible after installing dependencies such as `cargo-update`, `cargo-binstall`, or the Git dependency offered by the vcpkg integration.

### Steps to reproduce

1. Start UniGetUI on macOS.
2. Enable a manager with a missing dependency, for example Cargo.
3. Let UniGetUI install the dependency.
4. Accept the offered UniGetUI restart.

### Expected behavior

UniGetUI closes and relaunches on macOS.

### Actual behavior

UniGetUI closes, fails to relaunch, and records this exception:

```text
Exception type: Win32Exception (System.ComponentModel.Win32Exception)
Crash HResult: 0x80004005
Crash Message: An error occurred trying to start process 'powershell.exe'
with working directory '/'. No such file or directory

at System.Diagnostics.Process.Start(ProcessStartInfo)
at UniGetUI.Core.Tools.CoreTools.ScheduleRelaunchAfterExit(String)
at UniGetUI.Avalonia.Infrastructure.AppRestartHelper.Restart()
at UniGetUI.Avalonia.Views.DialogPages.MissingDependencyDialog.d__7.MoveNext()
```

### Probable cause

In tag `v2026.2.7`, `CoreTools.ScheduleRelaunchAfterExit` unconditionally uses:

```csharp
FileName = "powershell.exe"
Arguments = $"-NoProfile -WindowStyle Hidden -Command \"{command}\""
```

Source:

https://github.com/Devolutions/UniGetUI/blob/v2026.2.7/src/UniGetUI.Core.Tools/Tools.cs

Both the executable name and `-WindowStyle Hidden` are Windows-specific. On macOS, PowerShell 7 is exposed as `pwsh`. A platform-native relaunch mechanism would avoid requiring PowerShell at all.

### Workaround

Close UniGetUI and launch it manually instead of accepting the automatic restart.

Contributor guide

Open the contributing guide

Research direction

Start in src/UniGetUI.Core.Tools/Tools.cs at CoreTools.ScheduleRelaunchAfterExit and trace its call from AppRestartHelper.Restart. Compare the relaunch process setup with the macOS environment described in the report, then verify that accepting a dependency-installation restart closes and relaunches UniGetUI on macOS without regressing Windows behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.