Skip to content

Pre-commit fails due to missing "cargo" executable #338

@Jarmos-san

Description

@Jarmos-san

First off, thanks for creating Stylua, it's a great project & has been very helpful for me.

I use pre-commit on a daily basis & was glad to find out Stylua has support for it as well. Unfortunately, it appears I need to have Cargo installed to use the Pre-commit hook as well.

So, I was wondering if it was possible to use the Stylua binary (which should be available on $PATH) instead of building it from scratch? Or implement a condition wherein the binary will be built only when it doesn't exit in $PATH?

All in all, it doesn't sound right to obligate the user to install Cargo as well just to use Stylua as a pre-commit hook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions