Commit 4c147e8
committed
fix: unify config precedence for base URL and API key across all command paths
Extract resolveBaseURL() and resolveAPIKey() helpers in cmdutil.go so
that exec, cp, and push WebSocket/auth paths use the same
CLI flag > env var > config file > default precedence as the SDK client
created by getDefaultRequestOptions().
Previously, getDefaultRequestOptions read base_url and api_key from
cli.yaml, but exec/cp/push resolved these from env vars only, causing
split configuration sources within a single command run.1 parent 672a55a commit 4c147e8
4 files changed
+41
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
25 | 54 | | |
26 | 55 | | |
27 | 56 | | |
28 | 57 | | |
29 | 58 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 59 | + | |
35 | 60 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 61 | | |
41 | 62 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 63 | + | |
45 | 64 | | |
46 | | - | |
47 | | - | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 149 | + | |
156 | 150 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
160 | 154 | | |
161 | 155 | | |
162 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 149 | + | |
156 | 150 | | |
157 | | - | |
158 | | - | |
159 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
160 | 154 | | |
161 | 155 | | |
162 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 38 | + | |
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
| |||
73 | 67 | | |
74 | 68 | | |
75 | 69 | | |
76 | | - | |
| 70 | + | |
77 | 71 | | |
78 | 72 | | |
79 | 73 | | |
| |||
0 commit comments