Skip to content

Lefthook Git hook returning executable file not found in %PATH% #13052

@bbodenmiller

Description

@bbodenmiller

Describe the bug

Lefthook Git hook returning executable file not found in %PATH% when run from GitHub Desktop however does not throw error when run from Git bash

Version & OS

Version 2.9.3

Windows 1809

Steps to reproduce the behavior

  1. Install Lefthook to PATH & run lefthook install
  2. Add lefthook.yml to repo folder as follows
    pre-commit:
      commands:
        fix-line-endings:
          glob: "*.{config}"
          run: unix2dos {staged_files}
    
  3. Add web.config file to repo folder
  4. Attempt to commit

Expected behavior

pre-commit hook should run just as it does in Git Bash

Actual behavior

pre-commit hook does not run as it does in Git Bash

Screenshots

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions