cli: Fix another issue with unspecified editor

This commit includes a fix for another occurrence of
the missing `EDITOR` variable. This time, it was
inside the `rad edit` command.

The fix is trivial, as it simply returns the error to the caller.

Co-Developed-by: Slack Coder <slackcoder@server.ky>
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
Vincenzo Palazzo 2023-06-05 17:05:17 +02:00 committed by Alexis Sellier
parent 75139a6f02
commit 520fb61230
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -71,8 +71,8 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
let repo = storage.repository(id)?;
let payload = serde_json::to_string_pretty(&project.payload)?;
match term::Editor::new().extension("json").edit(payload) {
Ok(Some(updated_payload)) => {
match term::Editor::new().extension("json").edit(payload)? {
Some(updated_payload) => {
project.payload = serde_json::from_str(&updated_payload)?;
project.sign(&signer).and_then(|(_, sig)| {
project.update(