-
Notifications
You must be signed in to change notification settings - Fork 673
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure the correct worker name is published in legacy environmen…
…ts (#719) When a developer uses `--env` to specify an environment name, the Worker name should be computed from the top-level Worker name and the environment name. When the given environment name does not match those in the wrangler.toml, we error. But if no environments have been specified in the wrangler.toml, at all, then we only log a warning and continue. In this second case, we were reusing the top-level environment, which did not have the correct legacy environment fields set, such as the name. Now we ensure that such an environment is created as needed. See #680 (comment)
- Loading branch information
1 parent
18d09c7
commit 6503ace
Showing
3 changed files
with
86 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
fix: ensure the correct worker name is published in legacy environments | ||
|
||
When a developer uses `--env` to specify an environment name, the Worker name should | ||
be computed from the top-level Worker name and the environment name. | ||
|
||
When the given environment name does not match those in the wrangler.toml, we error. | ||
But if no environments have been specified in the wrangler.toml, at all, then we only | ||
log a warning and continue. | ||
|
||
In this second case, we were reusing the top-level environment, which did not have the | ||
correct legacy environment fields set, such as the name. Now we ensure that such an | ||
environment is created as needed. | ||
|
||
See https://github.com/cloudflare/wrangler2/pull/680#issuecomment-1080407556 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters