@@ -59,11 +59,11 @@ def _verify_uv_installed(ctx: Context, duty_name: str) -> None:
5959 ){% if dockerfile %}
6060
6161
62- def _pick_env(ctx: Context, env: str = "dev") -> str:
62+ def _pick_env(ctx: Context, env: str = "dev", action: str = "start" ) -> str:
6363 while True:
6464 ctx.run(
6565 "true",
66- title="Pick the environment you want to start ([dev]/prod): ",
66+ title=f "Pick the environment you want to {action} ([dev]/prod): ",
6767 nofail=True,
6868 allow_overrides=False,
6969 )
@@ -253,7 +253,7 @@ def docker_build(ctx: Context, env: str | None = None) -> None:
253253 Args:
254254 env: The environment to build for (`dev` or `prod`). Defaults to `None` to prompt the user.
255255 """
256- env = env or _pick_env(ctx)
256+ env = env or _pick_env(ctx, action="build" )
257257 ctx.run(
258258 ["docker", "compose", "--profile", env, "build"],
259259 title=f"Building Docker images for {env} environment",
@@ -307,7 +307,7 @@ def docker_stop(ctx: Context, env: str | None = None) -> None:
307307 Args:
308308 env: The environment to stop (`dev` or `prod`). Defaults to `None` to prompt the user.
309309 """
310- env = env or _pick_env(ctx)
310+ env = env or _pick_env(ctx, action="stop" )
311311 ctx.run(
312312 ["docker", "compose", "--profile", env, "down"],
313313 title=f"Stopping and removing {env} containers",
0 commit comments