Commit 75d6bbc
authored
chore: change env filename used by generate-i18n and improve error message (#3222)
## What's the purpose of this pull request?
The `generate-i18n` CLI command was loading credentials from `.env`
instead of `vtex.env`, which is the FastStore-specific environment file.
Additionally, the error message shown when credentials are missing was
too vague, not telling developers where to look or what to do next.
## How to test it?
Running `node packages/cli/bin/run generate-i18n ./packages/core`, test
with and without the variables on `vtex.env`.
Or through a test account, running the build command:
<img width="700" alt="Screenshot 2026-02-25 at 10 07 40"
src="https://github.com/user-attachments/assets/12d1209d-dfc6-406e-8786-4dfb3e51fccf"
/>
### Starters Deploy Preview
PR: vtex-sites/brandless.store#148
Even without the `vtex.env` it worked on production since those
variables were set in Webops Settings:
<img width="500" alt="Screenshot 2026-02-25 at 10 08 35"
src="https://github.com/user-attachments/assets/86550e20-39c4-4998-a973-c4c7509471c5"
/>
## References
- [Jira task](https://vtex-dev.atlassian.net/browse/SFS-3048)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved credentials validation for the i18n command with clearer
error messaging and earlier checks to fail fast.
* Environment file loading now occurs conditionally at runtime,
improving detection and configuration behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 5da1a3c commit 75d6bbc
1 file changed
+21
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 16 | | |
25 | 17 | | |
26 | 18 | | |
| |||
89 | 81 | | |
90 | 82 | | |
91 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
| |||
110 | 122 | | |
111 | 123 | | |
112 | 124 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
| |||
0 commit comments