R2NorthstarTools / FlightCore

Installer/Updater/Launcher for Northstar
MIT License
59 stars 14 forks source link

Handle error when Origin install not found on Windows #31

Closed GeckoEidechse closed 1 year ago

GeckoEidechse commented 1 year ago

When on a Windows machine where Titanfall2 is NOT installed with either Steam or Origin, the check for Titanfall2 Origin install fails and causes a panic.

called `Result::unwrap()` on an `Err` value: Powershell(Output { inner: Output { status: ExitStatus(ExitStatus(1)), stdout: "", stderr: "Get-ItemProperty : Cannot find path 'HKEY_LOCAL_MACHINE\SOFTWARE\Respawn\Titanfall2\' because it does not exist.
At line:1 char:1
+ Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Respawn\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (HKEY_LOCAL_MACH...awn\Titanfall2\:String) [Get-ItemProperty], ItemNotFo 
   undException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand

" }, success: false })

Link to crash report (private): https://sentry.io/organizations/northstar-kv/issues/3673655072/?project=6692177&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d

Alystrasz commented 1 year ago

This registry key is only set by Origin installs?

GeckoEidechse commented 1 year ago

I assumed so ^^

GeckoEidechse commented 1 year ago

Should be fixed with #99