From 4f81c72473a1e20aa7a5067776bcedfe24ce08c9 Mon Sep 17 00:00:00 2001 From: Ondrej Nosek Date: Nov 28 2022 02:21:47 +0000 Subject: `fedpkg update`: can handle $EDITOR with arguments Process the $EDITOR environment value first - it cat contain additional arguments. JIRA: RHELCMP-10430 Fixes: #492 Signed-off-by: Ondrej Nosek --- diff --git a/fedpkg/cli.py b/fedpkg/cli.py index 308bb15..5dd69b6 100644 --- a/fedpkg/cli.py +++ b/fedpkg/cli.py @@ -873,7 +873,9 @@ class fedpkgClient(cliClient): if not self.args.update_type or not self.args.notes: # Open the template in a text editor editor = os.getenv('EDITOR', 'vi') - self.cmd._run_command([editor, template_file], shell=False) + cmd = editor.split() # EDITOR command can contain additional arguments like "emacs -nw" + cmd.append(template_file) + self.cmd._run_command(cmd, shell=False) # Check to see if we got a template written out. Bail otherwise if not os.path.isfile(template_file):