stevegrunwell / wp-enforcer

Git hooks to encourage well-written WordPress.
https://stevegrunwell.com/blog/wp-enforcer/
MIT License
111 stars 14 forks source link

Fix Windows Path Issues #30

Closed ericmann closed 7 years ago

ericmann commented 8 years ago

On Windows (even under MSYS2, which is used by Git), tools like readlink are returing the wrong path and causing the installation routine to fail. Instead, we can use Composer's native configuration fetcher to figure out where the bin and vendor directories live.

@TODO Find a way around hard-coding the project name in the DIR variable.

Fixes bugs that went unnoticed in #2.

stevegrunwell commented 8 years ago

As we discussed on HipChat, let's see what we can do to find a way to get readlink (or similar) working with Windows-style symlinks (maybe @johnpbloch or @bradp have run into this?) so we can avoid hard-coding the repository name (which makes forking a real PITA).

I do love that you figured out how to use composer config --absolute bin-dir to get the directory, though. That's way cleaner than what we had before and is a lot less Bash-voodoo.

ericmann commented 7 years ago

Closing for now to avoid bitrot.