Commit 5ffe838
committed
Disallow any port operations when codespace has pending operation
Since all of the port operations require the codespace to be running, we
need to disallow these operations when there's a pending op since we
can't start the codespace in this state.
Since the API already disallows this, this is basically cleaning up the
error messages that the user sees in this state
Old error message:
```
$ gh cs ports forward 80:80
? Choose codespace: redacted
Starting codespace ⣻error connecting to codespace: error starting codespace: HTTP 422: your codespace has an operation pending: updating to a sku with a different amount of storage; please wait until this operation is complete (https://api.github.com/user/codespaces/cwndrws-redacted/start)
```
New error message:
```
$ gh cs ports forward 80:80
? Choose codespace: redacted
codespace is disabled while it has a pending operation: Changing machine types...
exit status 1
```1 parent da99a1b commit 5ffe838
1 file changed
+26
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 51 | + | |
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
| |||
235 | 231 | | |
236 | 232 | | |
237 | 233 | | |
238 | | - | |
| 234 | + | |
239 | 235 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 236 | + | |
244 | 237 | | |
245 | 238 | | |
246 | 239 | | |
| |||
311 | 304 | | |
312 | 305 | | |
313 | 306 | | |
314 | | - | |
| 307 | + | |
315 | 308 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 309 | + | |
320 | 310 | | |
321 | 311 | | |
322 | 312 | | |
| |||
380 | 370 | | |
381 | 371 | | |
382 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
0 commit comments