Skip to content

Commit a4bb19f

Browse files
committed
Small adjustment in the Python executable localizer for Windows
Former-commit-id: 0b6d0678428540d2cb8fbb775102d50a5cf701c8 [formerly 8b46a1279583795c83210ed5567924ed349230c6] [formerly e19e643a8b3dd0b97c146beeefef86397cebb6e6 [formerly 1443e42ccfdace6d06743e42e9be21b0dbbffa0d]] Former-commit-id: a0cee17a4bc059d53dd4896b9cc4206c2628ab1a [formerly ab394d8f4565bbe34712a7a6b4a549b90b4c4342] Former-commit-id: 8c782d60e53ea13d18b8335e4f6862a2a4ea8ef0 Former-commit-id: 00e0e69
1 parent 3d3b0a1 commit a4bb19f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/Embeddable/PyEnvironment.Embeddable.pas

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,16 @@ function TPyCustomEmbeddableDistribution.FindExecutable: string;
241241
LFiles: TArray<string>;
242242
begin
243243
{$IFDEF MSWINDOWS}
244+
//If we get this far and we're in a Windows only section
245+
//then we're done so just exit with the Result intact
244246
Result := TPath.Combine(GetEnvironmentPath(), 'python.exe');
245-
if not TFile.Exists(Result) then
247+
if TFile.Exists(Result) then
248+
Exit(Result)
249+
else
246250
Exit(String.Empty);
247-
// If we get this far and we're in a Windows only section then we're done so just exit with the Result intact
248-
Exit(Result);
249251
{$ELSEIF DEFINED(ANDROID)}
250-
//Let's try it in the library path first - we should place it in the library path in Android
252+
//Let's try it in the library path first
253+
//we should place it in the library path in Android
251254
Result := TPath.GetLibraryPath();
252255
LFiles := DoSearch(Result);
253256
if LFiles <> nil then

0 commit comments

Comments
 (0)