Skip to content

/bin/sh not on Windows #602

Closed
Closed
@adam-grant-hendry

Description

@adam-grant-hendry

Description

The pre-commit scripts test and format rely on /bin/sh, which does not exist on Windows (at least the path). This is a non-portable shebang, which can be fixed by using #!/usr/bin/env sh instead.

Steps to reproduce

  1. Follow the Contributing steps to:
    (a) Fork the repo, install dependencies through poetry, and setup the pre-commit hooks
  2. Run pre-commit run --all

Current behavior

On Windows, the pre-commit hooks format and linter and test fail with the error message Executable '/bin/sh' not found.

Desired behavior

The pre-commit hooks are able to run the provided shell scripts.

Screenshots

image

Environment

Commitizen Version: 2.35.0
Python Version: 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)]
Operating System: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions