From 08d57dc867e1f754163523ce202ed6407e726085 Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Mon, 28 Oct 2024 07:27:50 -0500 Subject: [PATCH] fix: use clean_path for home directory --- silverback/_build_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/silverback/_build_utils.py b/silverback/_build_utils.py index 18409376..ad6bd7ed 100644 --- a/silverback/_build_utils.py +++ b/silverback/_build_utils.py @@ -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 @@ -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): @@ -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():