Open timsutton opened 9 years ago
Oh, and if this addition seems reasonable, I can also update the README in this PR.
Having said that, I now realize I didn't even consider the different path on Windows. I assume people are using Make to do builds on Windows as well? If so I can look at making it go to the right place depending on the platform.
Looks OK to me, although if you're developing locally with Packer as well the GOPATH/bin
path will take precedence. If you fix for Windows i'll happily bring this in though.
Ah, I didn't realize that $GOPATH/bin
worked - I guess effectively any directory in $PATH
(or as the Packer docs call it, "directory where Packer is, or the executable directory.") Sounds like someone could have either option - assuming they have $GOPATH/bin
in their $PATH
, or the install to the plugins dir. I wonder if it's more likely to just cause confusion, though.
Perhaps it is. I've never had the need for it, TBH but I don't feel too strongly about the issue. If you can make a good case for it... :)
So I was wrong, I should have read the docs more explicitly. Packer will find the plugin if the plugin exe is in the same directory as packer itself, or if the plugin is in the cwd.
So I'm guessing you're either running a Packer that lives in $GOPATH/bin
or you're doing your work from within $GOPATH/bin
or the Git repo's bin
dir. But if your development has you working out of some other directory and using a system-installed Packer distribution (as is the case for me), this would be useful.
When I get a chance to set up an environment on Windows I can look at handling the plugin dir there. Do you have a recommended toolset for being able to run Make and the build script on Windows? Cygwin? GoW?
Yeah that's a fair point. I usually run cygwin on Windows but its possible Git Bash (installable via Chocolatey) will be sufficient in this case.
Not sure if this is helpful, but since finally getting dev builds sorted out on my machine I thought it'd be handy to be able to update the binaries in
~/.packer.d/plugins
. Not at all a Makefile expert, so there might well be a saner way to do this..