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 26, 2023
1 parent e9f1727 commit 405c4e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/ssl/test/ssl_test_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3534,9 +3534,12 @@ 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,
?CT_LOG("open_port({spawn_executable, ~p}, [stderr_to_stdout,~n {args, \"~s\"}]).",
[Cmd, lists:join($\s, Args0)]),
[Cmd, lists:join($\s, Args)]),
open_port({spawn_executable, Cmd},
[{args, Args}, stderr_to_stdout, hide])
end;
Expand Down

0 comments on commit 405c4e5

Please sign in to comment.