Fix plugin loading from CWD [GH-1521]

This commit is contained in:
Mitchell Hashimoto 2014-10-14 15:45:00 -07:00
parent ba0b4e7519
commit 6e4191829b
1 changed files with 8 additions and 0 deletions

View File

@ -149,6 +149,14 @@ func (c *config) LoadProvisioner(name string) (packer.Provisioner, error) {
func (c *config) discover(path string) error {
var err error
if !filepath.IsAbs(path) {
path, err = filepath.Abs(path)
if err != nil {
return err
}
}
err = c.discoverSingle(
filepath.Join(path, "packer-builder-*"), &c.Builders)
if err != nil {