Open curtislinden opened 10 years ago
Hi, after posting that I tried something that solved my problem. I now wrap the entire guard start
command with Foreman instead, and everything works perfectly. Sorry for adding noise to the issue.
No worries! I don't use guard regularly and I wrote this project more or less as a proof of concept. I am by no means opposed to someone who knows what they're doing with guard to improve upon it. I don't even know what :cmd means, and have little time to really understand the stack as well as I should to provide this as a good solution. Feel free to make PRs. :)
Jeremy Jackson
On Sep 4, 2015, at 6:11 PM, Justin Workman notifications@github.com wrote:
Hi, after posting that I tried something that solved my problem. I now wrap the entire guard start command with Foreman instead, and everything works perfectly. Sorry for adding noise to the issue.
— Reply to this email directly or view it on GitHub.
Guard has an option named :cmd
that you set in the Guardfile for each suite (Rspec, Teaspoon, etc). It's the command that runs Teaspoon (e.g. bundle exec rake teaspon
)
Proof of concept or not, this plugn does the job! Thanks for creating it.
@xtagon I have a similar issue with the :cmd
option trying to get guard-teaspoon to run bundle exec spring teaspoon
instead of bundle exec teaspoon
when a change is detected. Can you elaborate on your workaround/solution?
@nerfologist I start guard with the command foreman run bundle exec guard start
(Foreman loads my .env file). My Guardfile has the line:
guard :teaspoon, cmd: "spring rake teaspoon" do
# watch ...
end
It's a lot of comand wrapping but it works for me.
if anybody wants to submit a PR, I'd merge it.. I don't use it, so it's hard for me to get a good setup and make sure everything is working.
I don't know about others, but personally I would like to be able to set
:cmd
to anything I want. For my apps I wrap commands inforeman run
so it loads my environment variables for that command only, without exporting them into the current shell session. This works for Rspec + Guard, but Teaspon + Guard fails to honor the custom command.