Skip to content

Commit

Permalink
manimce: handle a case where registry is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen521kk committed May 16, 2022
1 parent 4b49c46 commit ef99083
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion manimce/tools/helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ function FindPython {
try {
$python_executable = Get-ItemProperty -Path "Registry::$name_install\InstallPath" | Select-Object ExecutablePath
Write-Host "Found Install Path - $($python_executable.ExecutablePath)" -ForegroundColor Yellow
return $python_executable.ExecutablePath
$path = $python_executable.ExecutablePath
if (!(Test-Path -Path $path))
{
throw [System.IO.FileNotFoundException] "$path not found."
}
return $path
}
catch {
Write-Host "Install Path Not Found for $install_version - Skipping" -ForegroundColor Green
Expand Down

0 comments on commit ef99083

Please sign in to comment.