You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(openssl/windows): report through the log, not through the exit code
Second windows run, with the instrumentation from the previous commit:
[mcpp] call failed: path.absolute(srcroot) -> attempt to call a nil value
[mcpp] wrote ...\mcpp_openssl_build.bat; running it
[mcpp] batch returned; ok=true err=nil
[mcpp] (no lib/ directory was produced)
Two findings, both acted on:
1. path.absolute() is not in the xlings sandbox either — the `safe` helper
caught it and fell back, which is what let the run continue at all. The call
is now gone rather than guarded: pkginfo.install_file() already returns an
absolute path, so srcroot derived from it is absolute too. What the path DOES
need is separator normalisation — it arrives with '/' and '\' mixed, and cmd
wants backslashes.
2. os.exec reported success for a batch that produced nothing and wrote nothing
to the log. That channel cannot be trusted here, so the batch no longer
communicates through its exit code: every step echoes into the log BEFORE
running, and the script always exits 0 after recording RESULT=<code>, which
Lua reads back and decides on. os.exec's return is kept but demoted to an
advisory log line.
The batch is also written with plain \n now. io.writefile already produces CRLF
on windows, so emitting \r\n gave \r\r\n — a batch whose stray CR lands inside
`set` values and breaks parsing in exactly the way observed: no output, no
work, and a clean exit.
0 commit comments