Skip to content

Commit f28b9a4

Browse files
committed
hotfix: fix --env-file not found compose issue
1 parent 29edb31 commit f28b9a4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cli/app/commands/service/base.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ def build_command(action: str, name: str = "all", env_file: str = None, compose_
3939
cmd = ["docker", "compose"]
4040
if compose_file:
4141
cmd.extend(["-f", compose_file])
42+
if env_file:
43+
cmd.extend(["--env-file", env_file])
4244
cmd.append(action)
4345

4446
if action == "up" and kwargs.get("detach", False):
4547
cmd.append("-d")
4648

47-
if env_file:
48-
cmd.extend(["--env-file", env_file])
49-
5049
if name != "all":
5150
cmd.append(name)
5251

@@ -58,11 +57,14 @@ def build_cleanup_command(
5857
remove_images: str = "all",
5958
remove_volumes: bool = True,
6059
remove_orphans: bool = True,
60+
env_file: str = None,
6161
) -> list[str]:
6262
"""Build a docker compose cleanup command (down with prune flags)."""
6363
cmd = ["docker", "compose"]
6464
if compose_file:
6565
cmd.extend(["-f", compose_file])
66+
if env_file:
67+
cmd.extend(["--env-file", env_file])
6668
cmd.append("down")
6769

6870
if remove_images:

cli/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "nixopus"
3-
version = "0.1.18"
3+
version = "0.1.19"
44
description = "A CLI for Nixopus"
55
authors = ["Nixopus <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)