Skip to content

Commit f686af6

Browse files
authored
Include dotfiles in error message file listings (#1728)
The error messages shown when buildpack detection fails (or when detection passes, but no required package manager files are found later) include a file listing of the project to help with debugging. (e.g. to make misspellings or having forgotten to commit files more obvious.) Previously these file listings didn't include dotfiles, which meant not all project files would be shown. This is particularly relevant given that the the newly supported `.python-version` file is a dotfile. GUS-W-17524155.
1 parent 4f4c3c9 commit f686af6

File tree

7 files changed

+5
-2
lines changed

7 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [Unreleased]
44

5+
- Improved the file listing in the error messages shown when buildpack detection fails or when no Python package manager files are found. ([#1728](https://github.com/heroku/heroku-buildpack-python/pull/1728))
56

67
## [v272] - 2024-12-13
78

bin/detect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ directory of its source code.
5555
5656
Currently the root directory of your app contains:
5757
58-
$(ls -1 --indicator-style=slash "${BUILD_DIR}" || true)
58+
$(ls -1A --indicator-style=slash "${BUILD_DIR}" || true)
5959
6060
If your app already has a package manager file, check that it:
6161

lib/package_manager.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function package_manager::determine_package_manager() {
8080
8181
Currently the root directory of your app contains:
8282
83-
$(ls -1 --indicator-style=slash "${build_dir}" || true)
83+
$(ls -1A --indicator-style=slash "${build_dir}" || true)
8484
8585
If your app already has a package manager file, check that it:
8686

spec/fixtures/no_python_project_files/.example-dotfile

Whitespace-only changes.

spec/fixtures/pyproject_toml_only/.example-dotfile

Whitespace-only changes.

spec/hatchet/detect_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
remote: !
2424
remote: ! Currently the root directory of your app contains:
2525
remote: !
26+
remote: ! .example-dotfile
2627
remote: ! README.md
2728
remote: ! subdir/
2829
remote: !

spec/hatchet/package_manager_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
remote: !
2020
remote: ! Currently the root directory of your app contains:
2121
remote: !
22+
remote: ! .example-dotfile
2223
remote: ! pyproject.toml
2324
remote: ! subdir/
2425
remote: !

0 commit comments

Comments
 (0)