Be more specific if target was not found or not executable · Issue #24 · Gusto/scope · GitHub
Skip to content

Be more specific if target was not found or not executable #24

Open

Description

@technicalpickles
❯ scope doctor run
10:38:30  INFO More detailed logs at /tmp/scope/scope-root-20240123-vK6v.log
10:38:30 ERROR Critical Error. File /Users/josh.nichols/workspace/myapp/.scope/bin/rbenv-configured.sh was not executable or it did not exist.

The file does exist, but it's not executable. It should be possible to check if it exists, then if it's executable to give a better message for people working on these.

Activity

  1. rubberduck203 commented on Jul 28, 2026

    @rubberduck203
    Contributor

    Confirmed this still reproduces against current `main` (2026-07-28).

    `check_pre_exec` in `src/shared/capture.rs` (lines 289-318) still collapses three distinct failure modes into the same generic `CaptureError::MissingShExec` message ("File {name} was not executable or it did not exist."):

    1. the binary can't be resolved on `PATH` (`which_in` fails)
    2. the resolved path doesn't exist on disk
    3. the file exists but lacks the executable permission bit (checked around line 310-314)

    The code is essentially unchanged since this was filed, so distinguishing these three cases in the error message (or splitting into distinct error variants) would resolve this directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions