hashicorp / hashicorp/packer

Documentation error

Open Beginner friendly
#13,500 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
15.8k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

#### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

#### Overview of the Issue

There seems to be an error in the [shell-local processor documentation](https://developer.hashicorp.com/packer/docs/provisioners/shell-local#execute_command) - the default is probably actually `["/bin/sh", "-c", "{{.Vars}} {{.Script}}"]`, like what is shown in the [shell-local _post-processor_ documentation](https://developer.hashicorp.com/packer/docs/post-processors/shell-local#execute_command), though I have not verified that.

I have verified that it isn't `["/bin/sh", "-c", "{{.Vars}}", "{{.Script}}"]`, as plugging that into `execute_command` causes the script to not run.

#### Proposed fix
```diff
-["/bin/sh", "-c", "{{.Vars}}", "{{.Script}}"]
+["/bin/sh", "-c", "{{.Vars}} {{.Script}}"]
```

Contributor guide

Open the contributing guide

Research direction

Start with the shell-local processor documentation's execute_command section and compare it with the linked shell-local post-processor documentation. Confirm the actual default before editing the documented command, then verify that the processor documentation matches the implementation and the post-processor example.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.