Skip to content

Conversation

@timsutton
Copy link

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..

@timsutton
Copy link
Author

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.

@mefellows
Copy link
Contributor

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.

@timsutton
Copy link
Author

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.

@mefellows
Copy link
Contributor

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... :)

@timsutton
Copy link
Author

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?

@mefellows
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants