Skip to content

Pre-commit hook expects Spectral binary in specific path, contrary to what README.md says #3

@Nirusu

Description

@Nirusu

The README.md for the Spectral pre-commit hooks mentions the following requirement:

Make sure you have the spectral executable in your PATH.

This is not what this pre-commit hook is doing.

The pre-commit hook is specifically expecting the Spectral binary to be located in:
$HOME/.spectral/spectral

entry: bash -c '$HOME/.spectral/spectral scan --unstaged'

In my case, I have the binary in

➜  ~ whereis spectral
spectral: /opt/homebrew/bin/spectral

(which is definitely in my PATH and installed via Homebrew, just like the documentation suggests it) and the pre-commit hook fails since it doesn't find the binary:

spectral scanner.........................................................Failed
- hook id: spectral
- exit code: 127

/bin/bash: /Users/nils/.spectral/spectral: No such file or directory

System information in case needed is:
macOS Sonoma 14.1 (arm64)
MacBook Pro with M1 SoC

PS: Can we also get a arm64 binary soon, please? I think Spectral currently is the only development related tool I have installed locally for which Rosetta is still required.

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