You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand the motivation behind the change, e.g. for monorepos containing multiple independent packer templates, it would be awesome to make this configurable.
To reproduce
Steps to reproduce the behavior:
Create the above setup
Then run pre-commit run --all-files packer_validate
Expected behavior
Hook should pass, just like a normal invocation:
# packer validate packer/main.pkr.hcl
The configuration is valid.
Any helpful log output or screenshots
Paste the results here:
# pre-commit run --all-files packer_validatePacker Validate..........................................................Failed- hook id: packer_validate- exit code: 1Error: Failed preparing provisioner-block "ansible" "" on main.pkr.hcl line 84: (source code not available)1 error(s) occurred:* playbook_file: ./ansible/playbook.yml is invalid: stat ./ansible/playbook.yml:no such file or directoryFailed path: packer================================
The text was updated successfully, but these errors were encountered:
π Summary
Since #47, the current working directory is changed to the location of each HCL template.
This breaks setups where HCL templates are in subdirectories and relatively include ansible playbooks, e.g.:
With
packer/main.pkr.hcl
containing:And
.pre-commit-config.yaml
:As I understand the motivation behind the change, e.g. for monorepos containing multiple independent packer templates, it would be awesome to make this configurable.
To reproduce
Steps to reproduce the behavior:
pre-commit run --all-files packer_validate
Expected behavior
Hook should pass, just like a normal invocation:
# packer validate packer/main.pkr.hcl The configuration is valid.
Any helpful log output or screenshots
Paste the results here:
The text was updated successfully, but these errors were encountered: