Skip to content

Commit 4ce989e

Browse files
committed
Rename plain-dev env vars to avoid preflight settings warnings
Drop the PLAIN_ prefix from dev env vars (PLAIN_DEV_URL -> DEV_URL, PLAIN_DEV_SERVICES_AUTO -> DEV_SERVICES_AUTO) so they don't trigger the unused_env_var preflight check. Remove unused PLAIN_DEV var entirely.
1 parent aa5b2db commit 4ce989e

5 files changed

Lines changed: 7 additions & 8 deletions

File tree

example/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies = [
3939
version = "4.2.1"
4040

4141
[tool.plain.dev.run]
42-
tunnel = { cmd = "plain tunnel $PLAIN_DEV_URL --subdomain plain-example --quiet" }
42+
tunnel = { cmd = "plain tunnel $DEV_URL --subdomain plain-example --quiet" }
4343

4444
[tool.plain.code.oxc]
4545
version = "1.51.0"

plain-dev/plain/dev/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def cli(
7878
"You cannot use both --start and --stop at the same time."
7979
)
8080

81-
os.environ["PLAIN_DEV_SERVICES_AUTO"] = "false"
81+
os.environ["DEV_SERVICES_AUTO"] = "false"
8282

8383
dev = DevProcess()
8484

plain-dev/plain/dev/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def setup(
6868

6969
self.plain_env = {
7070
"PYTHONUNBUFFERED": "true",
71-
"PLAIN_DEV": "true",
7271
"PLAIN_SERVER_ACCESS_LOG_FIELDS": '["method", "url", "status", "duration_ms", "size"]',
7372
"FORCE_COLOR": "1",
7473
"PYTHONWARNINGS": "default::DeprecationWarning,default::PendingDeprecationWarning",
@@ -82,7 +81,7 @@ def setup(
8281
self.custom_process_env = {
8382
**self.plain_env,
8483
"PORT": str(self.port),
85-
"PLAIN_DEV_URL": self.url,
84+
"DEV_URL": self.url,
8685
}
8786

8887
if self.tunnel_url:

plain-dev/plain/dev/services.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ def auto_start_services() -> None:
1818
"""Start dev *services* in the background if not already running."""
1919

2020
# Check if we're in CI and auto-start is not explicitly enabled
21-
if os.environ.get("CI") and os.environ.get("PLAIN_DEV_SERVICES_AUTO") is None:
21+
if os.environ.get("CI") and os.environ.get("DEV_SERVICES_AUTO") is None:
2222
return
2323

24-
if os.environ.get("PLAIN_DEV_SERVICES_AUTO", "true") not in [
24+
if os.environ.get("DEV_SERVICES_AUTO", "true") not in [
2525
"1",
2626
"true",
2727
"yes",

plain-tunnel/plain/tunnel/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ You can run the tunnel automatically alongside your development server by adding
3535

3636
```toml
3737
[tool.plain.dev.run]
38-
tunnel = {cmd = "plain tunnel $PLAIN_DEV_URL --subdomain myapp --quiet"}
38+
tunnel = {cmd = "plain tunnel $DEV_URL --subdomain myapp --quiet"}
3939
```
4040

41-
The `$PLAIN_DEV_URL` variable is automatically set to your local server URL. The `--quiet` flag reduces log output so it does not clutter your terminal.
41+
The `$DEV_URL` variable is automatically set to your local server URL. The `--quiet` flag reduces log output so it does not clutter your terminal.
4242

4343
To display the tunnel URL in the `plain dev` header, add `DEV_TUNNEL_URL` to your `.env` file:
4444

0 commit comments

Comments
 (0)