From 3c8bb4ea68ed641e86016f73e5eafd50ad145f3d Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Fri, 5 Feb 2016 11:16:39 -0800 Subject: [PATCH] Just run from root always --- scripts/generate-plugins.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/generate-plugins.go b/scripts/generate-plugins.go index 2dced41a3..84a69ae9c 100644 --- a/scripts/generate-plugins.go +++ b/scripts/generate-plugins.go @@ -20,16 +20,9 @@ import ( const target = "command/plugin.go" func main() { - // Normally this is run via go:generate from the command folder so we need - // to cd .. first. But when developing it's easier to use go run, so we'll - // support that too. wd, _ := os.Getwd() if filepath.Base(wd) != "packer" { - os.Chdir("..") - wd, _ = os.Getwd() - if filepath.Base(wd) != "packer" { - log.Fatalf("This program must be invoked in the packer project root; in %s", wd) - } + log.Fatalf("This program must be invoked in the packer project root; in %s", wd) } // Collect all of the data we need about plugins we have in the project