Skip to content

Commit c4b9f3b

Browse files
refactor: clear .env.development even without enabled content types
1 parent 49f30c1 commit c4b9f3b

File tree

1 file changed

+4
-4
lines changed
  • src/afterpython/cli/commands

1 file changed

+4
-4
lines changed

src/afterpython/cli/commands/dev.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ def cleanup_processes():
140140
try:
141141
prebuild()
142142

143+
# Clear .env.development before writing new ports
144+
env_file = paths.website_path / ".env.development"
145+
env_file.write_text("") # Clear existing content
146+
143147
# myst development servers
144148
if enabled_content_types:
145-
# Clear .env.development before writing new ports
146-
env_file = paths.website_path / ".env.development"
147-
env_file.write_text("") # Clear existing content
148-
149149
next_port = 3000
150150
for content_type in CONTENT_TYPES:
151151
# Skip content types that are not enabled

0 commit comments

Comments
 (0)