Commit 0137a55
committed
fix: correct region index mapping in template deploy when unavailable regions are filtered
When free tier users deploy using CLI template deploy command and select a region,
they were encountering "REQUIRE_PAID_PLAN" errors even when selecting available regions.
This was caused by an index mismatch bug in pkg/selector/selector.go where:
- regionOptions array contained only available regions (filtered)
- User selected an index from this filtered list
- Code used that index on the original unfiltered regions array
This resulted in selecting the wrong region (potentially an unavailable one).
The fix creates a separate availableRegions array and uses it for indexing,
matching the pattern already applied to internal/cmd/project/create/create.go
in commit 8e5d1ab.1 parent 89892da commit 0137a55
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
0 commit comments