Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Jan 15, 2024
1 parent 4323001 commit f1068f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/deployment-cli-tools/ch_cli_tools/skaffold.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def process_build_dockerfile(dockerfile_path, root_path, global_context=False, r
def identify_unicorn_based_main(candidates):
import re
gunicorn_pattern = re.compile(r"gunicorn")
for candidate in candidates:
# sort candidates, shortest path first
for candidate in sorted(candidates,key=lambda x: len(x.split("/"))):
dockerfile_path = f"{candidate}/.."
while not exists(f"{dockerfile_path}/Dockerfile") and abspath(dockerfile_path) != abspath(root_path):
dockerfile_path += "/.."
Expand Down

0 comments on commit f1068f2

Please sign in to comment.