Merge pull request #9728 from hashicorp/fix_9722

fix generator to work even in nested packer/packer dirs
This commit is contained in:
Megan Marsh 2020-08-07 07:25:56 -07:00 committed by GitHub
commit 643d6d165b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ func main() {
if err != nil {
panic(err)
}
paths := strings.SplitAfter(absFilePath, "packer"+string(os.PathSeparator))
paths := strings.Split(absFilePath, "cmd"+string(os.PathSeparator)+
"generate-fixer-deprecations"+string(os.PathSeparator)+"main.go")
packerDir := paths[0]
// Load all deprecated options from all active fixers