Problem
In .zi-module --reset, the rebuild message "recompilation of the zpmod module has been requested…" fires even on a fresh install where no RECOMPILE_REQUEST file exists.
The condition uses ${recompile_request_ts:-1} -gt ${compiled_at_ts:-0}, so when neither file exists the comparison is 1 > 0 → true, triggering a misleading message.
Fix
Gate the full rebuild branch on RECOMPILE_REQUEST actually existing:
if [[ -e ${ZI[ZMODULES_DIR]}/zpmod/RECOMPILE_REQUEST ]] && \
[[ ${recompile_request_ts:-1} -gt ${compiled_at_ts:-0} ]]; then
# explicit recompile requested
else
# first-time or COMPILED_AT absent — build silently or with a different message
fi
For a fresh install with no COMPILED_AT, the --reset path should either skip the prompt or show a neutral "module not yet compiled, building now…" message.
Context
Flagged in PR #341 review.
Problem
In
.zi-module --reset, the rebuild message "recompilation of the zpmod module has been requested…" fires even on a fresh install where noRECOMPILE_REQUESTfile exists.The condition uses
${recompile_request_ts:-1} -gt ${compiled_at_ts:-0}, so when neither file exists the comparison is1 > 0→ true, triggering a misleading message.Fix
Gate the full rebuild branch on
RECOMPILE_REQUESTactually existing:For a fresh install with no
COMPILED_AT, the--resetpath should either skip the prompt or show a neutral "module not yet compiled, building now…" message.Context
Flagged in PR #341 review.