Skip to content

Commit

Permalink
fix: use clean_path for home directory
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson2427 committed Oct 28, 2024
1 parent eef0aaf commit 08d57dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion silverback/_build_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Union

import click
from ape.utils.os import clean_path

DOCKERFILE_CONTENT = """
FROM ghcr.io/apeworx/silverback:stable
Expand Down Expand Up @@ -65,6 +66,7 @@ def generate_dockerfiles(self, path: PathType):
"""
Will generate a file based on path type
"""
raise NotImplementedError(f"Path type {type(path)} not supported")

@generate_dockerfiles.register
def _(self, path: FilePath):
Expand Down Expand Up @@ -93,7 +95,7 @@ def _build_helper(self, dockerfile_c: str):
dockerfile_path = Path.cwd() / ".silverback-images" / self.dockerfile_name
dockerfile_path.parent.mkdir(exist_ok=True)
dockerfile_path.write_text(dockerfile_c.strip() + "\n")
click.echo(f"Generated {dockerfile_path}")
click.echo(f"Generated {clean_path(dockerfile_path)}")

def _check_for_requirements(self, dockerfile_content):
if (Path.cwd() / "requirements.txt").exists():
Expand Down

0 comments on commit 08d57dc

Please sign in to comment.