bats-core / bats-core

Bash Automated Testing System
https://bats-core.readthedocs.io/
Other
4.9k stars 420 forks source link

git bash uses windows binary 'sort' instead of mingw64 #773

Open CIenthusiast opened 1 year ago

CIenthusiast commented 1 year ago

Describe the bug First of i want to say that i dont think that this is a BUG of bats-core!

Im running a Jenkins with linux-nodes and windows-nodes due to the nature of the ci which is running on both OS. For this i have a gitbash as a substitute to execute shell scripts on Jenkins-Pipelines since i want my ci to share all the scripts on every OS.

When running bats under windows via git-bash it can happen that the git bash uses \system32\sort instead of /usr/bin/sort

To Reproduce I cant really reproduce on my local machine. Only reproducing

  1. Jenkins installation (with a node on windows + gitbash)
  2. execute bats in pipeline with multible test files

Expected behavior Use the sort of /usr/bin/sort when running under mingw

Environment (please complete the following information):

Additional context Like i said i dont think this is a problem of bats itself. It can be fixed in bats itself tho.

CIenthusiast commented 1 year ago

Please let me know if you require a PR

martin-schulze-vireso commented 7 months ago

You are very welcome to provide a PR to fix this.