Try to make sure that issue text is not lost on creation failure
This patch solves
2f43c1e2d1616b07e13e3f8f0b0dcb397aa8fb7c
by trying to rescue the issue title and description. If the issue creation fails, it tries to open a named tempfile and print title and description to that file (plus flushing it). If any of these steps fail, it prints the issue to the terminal. If it succeeds, it prints the path of the tempfile. Then, normal error propagation continues.
This is mostly a proposal. I am sure this code could be made nicer in some way, but I tried to make it as KISS as possible.
1 file changed
+46
-4
9ff67562
→
3a6e5fbe
modified crates/radicle-cli/src/commands/issue.rs
@@ -387,14 +387,24 @@ where
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -402,6 +412,38 @@ where
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|