From 6636a98445e31330a1e9f4203d1a0522ce573d7f Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 25 Oct 2023 10:44:18 +0200 Subject: [PATCH] Fix finding openssl on windows x32 wsl.exe is not available on x32 cmd since it is in the the 64b path. --- lib/ssl/test/ssl_test_lib.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl index 56febfd8b8f4..676a330dddc8 100644 --- a/lib/ssl/test/ssl_test_lib.erl +++ b/lib/ssl/test/ssl_test_lib.erl @@ -3455,7 +3455,10 @@ portable_open_port("openssl" = Exe, Args0) -> end, Args1 = [Translate(Arg) || Arg <- Args0], Args = ["/C","wsl","openssl"| Args1] ++ ["2>&1"], - Cmd = os:find_executable("cmd"), + Cmd = case erlang:system_info(wordsize) of + 8 -> os:find_executable("cmd"); + 4 -> filename:join(os:getenv("WINDIR"),"sysnative/cmd") + end, ?LOG("open_port({spawn_executable, ~p}, [stderr_to_stdout,~n {args, \"~s\"}]).", [Cmd, lists:join($\s, Args0)]), open_port({spawn_executable, Cmd},