Skip to content

Commit

Permalink
Fix finding openssl on windows x32
Browse files Browse the repository at this point in the history
wsl.exe is not available on x32 cmd since it is in the the 64b path.
  • Loading branch information
dgud committed Oct 25, 2023
1 parent fd0e27a commit 6636a98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ssl/test/ssl_test_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 6636a98

Please sign in to comment.