-
Notifications
You must be signed in to change notification settings - Fork 517
Fix call to ../libexec/bats from bin/bats when install/bin/bats is not current dir or parameters are passed #234
base: master
Are you sure you want to change the base?
Conversation
…rrent directory and parameters are passed.
This might be a bug in "Git Bash for windows" (I don't know what that is). BATS runs just fine via both WSL and Cygwin. I'd suggest using one of those instead. |
Thanks Michael, Git Bash is just a linux emulator for Windows that you get when you install Git on Windows: I reported my environment as FYI, but I honestly think the bug I fixed is going to happen on any environment. The install.sh script is installing a script that is supposed to make a call back to |
I can imagine that being true, but empirically it works fine on Linux, Cygwin, WSL, and OSX (and notably the Travis CI is also failing with this PR), which makes it seem a lot more like an issue specific to Git on Windows. |
Thanks Michael, I don't know how it's working, but if it works, go for it. Note I just noticed that the travis-ci build is failing on something that looks to be independent of my change: "/home/travis/.travis/job_stages: line 57: bin/bats: No such file or directory" I'm curious if that build works on the master branch as it is. Cheers, Jonathan |
I'm pretty sure the failure is related to your PR - the master branch is passing (though admittedly it's old), and I don't see that error in other recent PRs. Seeing as you're changing how Bats its invoked and loaded a "No such file" error seems likely to be related. |
On Suse Linux here and having the same issue. |
You probably want to migrate to https://github.com/bats-core/bats-core |
I'll follow up with the project I am working on that embeds this as a sub-module, but I still think this should be merged. It's small and the value add is clear. Can't see a downside (although I have no idea what the CI failure is right now). |
@cornfeedhobo again, migrate to bats-core; this project is dead. |
I see. thanks. |
The following procedure failed:
In "Git Bash" for windows.
$ git clone https://github.com/sstephenson/bats.git
$ ./bats/install.sh /usr/local
Installed Bats to /usr/local/bin/bats
$ bats mytest.bats
/usr/local/bin/bats: line 1: ../libexec/bats: No such file or directory
Fixed by modifying bin/bats to be aware of $(dirname$0), and then I figured out that I also needed to pass parameters, hence "$ @"