Skip to content

doesn't work in visual studio 2019 on Windows #2182

@hushigome-visco

Description

@hushigome-visco

describe your issue

When I try to commit from visual studio 2019, I get the following message:

/usr/bin/env: ‘bash’: No such file or directory

I have confirmed that it works from vscode and command prompt.
I rewrote the .git/hooks/pre-commit to below and it worked.

#!/usr/bin/env sh

As far as I can see, visual studio git hooks only support sh.
Are you aware of this problem?

thank you.

pre-commit --version

pre-commit 2.16.0

.pre-commit-config.yaml

repos:
  - repo: https://github.com/pre-commit/mirrors-clang-format
    rev: v13.0.0
    hooks:
      - id: clang-format

~/.cache/pre-commit/pre-commit.log (if present)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions