Repository navigation
Conversation
versionProbeFailure mapped both ENOENT and EACCES to command_missing, so a selected launcher that exists but is not executable reported executable_missing with "was not found" and advice to point REA_APKTOOL_COMMAND somewhere else. The errno survived on the cause but never reached the projected availability reason or diagnostics. Split the two: ENOENT keeps the missing-launcher diagnosis, while EACCES and EPERM become command_unresolved with a permission reason, the filesystem_error, and execute-access remediation - the same treatment the Windows PATH inspection already applies to an unreadable candidate.
|
Thank you for separating launcher permission failures from missing paths. Main now handles the reported |
Merge current main, which already reports EACCES as command_not_executable, and narrow this change to the remaining permission outcome: EPERM, which a refused exec can surface (for example a noexec mount or a security policy), now maps to command_not_executable instead of falling through to version_unresolved. The earlier provider-level test is dropped in favour of an EPERM case in the existing launcher-spawn table.
|
Thanks @morluto, narrowed in 6d2f3af (merged current
Diff against |
A noexec mount refuses exec with EACCES, not EPERM.
[Low impact] The PR appears safe to merge; no blocking issues were found. SummaryThe PR reports launcher spawn error
Reviews (3) · Last reviewed commit: "style(apktool): wrap the launcher errno ..." · Reviewed by Greptile |
Narrow the change to the one permission outcome main's versionProbeFailure still misses: keep main's EACCES structure, remediation constants and message wording, and have EPERM take the same command_not_executable path plus the single EPERM row in the spawn-errno test.
|
Thanks @morluto — narrowed per the review, on top of a merge of current
|
|
TL;DR: I ran the PR's test file on draft head edb61d6 with Node 22, 24 and 26, and all 11 tests passed on each. With the fix removed, the new test
Not run
Test setup
Commandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- src/apktool/ApktoolVersionProbe.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
A launcher whose exec is refused by an operating-system security policy surfaces EPERM, not EACCES. It was reported as a missing launcher, so the recovery pointed at installing apktool instead of fixing execute permission. EPERM now joins EACCES as command_not_executable. Squashed from #5180 and rebased onto main. Supersedes #5180 (follow-up to #5177) Co-Authored-By: gensokyo-dev <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks! This landed on main in #10490 as its own commit, cherry-picked with your authorship kept (rebase merge). Closing in favor of that merge. |
Fixes #5177.
Problem
versionProbeFailurecollapsedENOENTandEACCESinto onecommand_missingfailure. A launcher that exists but is not executable forthe current user therefore reported "was not found" with remediation telling
the caller to point
REA_APKTOOL_COMMANDat a different launcher. After theEACCEShandling landed in main,EPERM— the other errno a refused exec cansurface (for example a launcher blocked by an operating-system security
policy) — still had no dedicated outcome.
Approach
The branch is narrowed to exactly that remaining permission outcome, per the
2026-10-26 review. It now merges current main and keeps main's
EACCESbranch structure, message wording and
APKTOOL_NOT_EXECUTABLE_REMEDIATION/APKTOOL_MISSING_REMEDIATIONconstants byte-for-byte; the only source changeis that the launcher-spawn failure matcher accepts
EPERMalongsideENOENT/EACCES, withEPERMtaking the samecommand_not_executable,"Execution of the selected apktool launcher was denied" path as
EACCES. Ashort comment records why
EPERMis a permission failure rather than amissing launcher, as in the report.
ProviderRejectionCodeis unchanged; no public tool schema or catalogcontract is widened. Refusal behavior is unchanged — only the diagnosis and
recovery advice differ.
Validation
New regression: one added row in the existing
distinguishes launcher spawn it.each(["EPERM", "command_not_executable"]), assertingEPERMmaps tothe same denial outcome as
EACCESand never tocommand_missing. TheEACCES/ENOENTrows are main's, unchanged. Ran on Linux (Node v20.19.2;the pinned
.nvmrc24.22.1 toolchain is not installed in this sandbox, testsare unaffected).
Coverage limits: the head was exercised on Linux; macOS arm64 and Windows
were not re-run.
EPERMis covered by the shared branch rather than aseparate fixture. Real Apktool/JVM decoding is not involved — the launcher is
an inert stub, as in the report. The earlier
EACCESreport is recorded in#5177; no native
EPERMreproduction is available locally.Author readiness
Unchecked for the human owner to complete.