SMillerDev / phpdraft

An API Blueprint parser in PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow passing in a path to Drafter

scorgn opened this issue · comments

I have everything automated and I do not want to move Drafter into /usr/bin as the program might deploy on many different platforms. I also don't want to rely on the Drafter found online (even though passing in -o doesn't seem to work for me anyways). There should be a way to pass in a path for Drafter when I call phpdraft.

It'll actually expect it to be in $PATH, it doesn't have to be in /usr/bin. How would you suggest to point to the drafter binary instead?

Right sorry that's what I meant.

I am using hendrikmaus/drafter-installer which builds a drafter binary in vendor/bin. I don't want to add vendor/bin to my $PATH environment variable because this is all automated and across multiple machines.

I would suggest doing it through an option, such as --drafter vendor/bin/drafter.

I am going to resort to using aglio for documentation for now regardless but this would be a cool addition.

If what you want is not modifying the PATH globally, you can modify it only when running your phpdraft as a single command PATH="vendor/bin:$PATH" phpdraft ...

Yeah, this is impractical and multiple good alternatives exist. I'm going to close this.