Skip to content

Commit

Permalink
docs:Improved package.py error message for missing source_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ers81239 committed Dec 22, 2020
1 parent 252e593 commit 91cb23d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ terraform apply

## <a name="build"></a> Build Dependencies

You can specify `source_path` in a variety of ways to achieve desired flexibility when building deployment packages locally or in Docker. You can use absolute or relative paths.
You can specify `source_path` in a variety of ways to achieve desired flexibility when building deployment packages locally or in Docker. You can use absolute or relative paths. If you have placed terraform files in subdirectories, note that relative paths are specified from the directory where `terraform plan` is run and not the location of your terraform file.

Note that, when building locally, files are not copying anywhere from the source directories when making packages, we use fast Python regular expressions to find matching files and directories, which makes packaging very fast and easy to understand.

Expand Down
2 changes: 1 addition & 1 deletion package.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def commands_step(path, commands):
if isinstance(claim, str):
path = claim
if not os.path.exists(path):
abort('source_path must be set.')
abort('Could not locate source_path "{path}". Paths are relative to directory where `terraform plan` is being run.'.format(path=path))
runtime = query.runtime
if runtime.startswith('python'):
pip_requirements_step(
Expand Down

0 comments on commit 91cb23d

Please sign in to comment.