Commit c0a860c
authored
Add suppress-version-warning config option (#635)
## 📝 Description
**What does this PR do and why is this change necessary?**
Adds `get_bool('value')` method for configuration options and adds a step in configuration to support `suppress-version-warning`.
Also adds support for `LINODE_CLI_SUPPRESS_VERSION_WARNING` environment variable.
## ✔️ How to Test
**What are the steps to reproduce the issue or verify the changes?**
1. Install the new version of the CLI
```bash
make install
```
2. Go through the configuration process
```bash
lin configure
```
3. The last question should ask you about suppressing API Version Warnings
4. Use the CLI and see if you view this warning
### Environment variable
1. Install the new CLI or delete the value from your config
2. Use the cli after setting the environment variable
```bash
export LINODE_CLI_SUPPRESS_VERSION_WARNING=true
lin linodes ls
unset $LINODE_CLI_SUPPRESS_VERSION_WARNING
lin linodes ls
```
3. Verify the output doesn't have the error.
**How do I run the relevant unit/integration tests?**
```bash
make testunit
```
resolves #5821 parent 5e6003b commit c0a860c
File tree
4 files changed
+46
-3
lines changed- linodecli
- configuration
- tests/unit
- wiki
4 files changed
+46
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
376 | | - | |
377 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
189 | 213 | | |
190 | 214 | | |
191 | 215 | | |
| |||
449 | 473 | | |
450 | 474 | | |
451 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
452 | 479 | | |
453 | 480 | | |
454 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| |||
265 | 274 | | |
266 | 275 | | |
267 | 276 | | |
| 277 | + | |
268 | 278 | | |
269 | 279 | | |
270 | 280 | | |
| |||
319 | 329 | | |
320 | 330 | | |
321 | 331 | | |
322 | | - | |
| 332 | + | |
323 | 333 | | |
324 | 334 | | |
325 | 335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
0 commit comments