I'm running code as my default editor for everything. When trying to fedpkg update the bodhi.template file is opened, but the command fails immediately, outputting this:
fedpkg update
$ fedpkg update Could not execute update: Could not generate update request: Missing update type, which is required to create update. A copy of the filled in template is saved as bodhi.template.last
The workaround is to override the default editor to vim.
Is it possible to make VSCode work?
What is the value of your EDITOR variable?
EDITOR
Plain code without any options
$ echo $EDITOR code
Also, I don't know if this is a regression. I haven't made an update in a long time, and before I was using vim as my default.
Try setting it to EDITOR="code --wait".
EDITOR="code --wait"
It's not a regression, I think it's just VSCode not behaving nicely be default. Fedpkg spawns the process and uses it finishing as a signal that the file is ready. But VSCode likely delegates the action to some other process and finishes immediately.
I think you will see the same behaviour in git commit.
git commit
Yeah, you are right, I have my default git editor as "code --wait".
I've set the EDITOR="code --wait", however this still doesn't work properly
$ fedpkg update Could not execute update: [Errno 2] No such file or directory: 'code --wait'
That's #492 , fixed in fedpkg 1.44 https://docs.pagure.org/fedpkg/releases/1.44.html The update is in updates-testing now. Please test and add karma in Bodhi.
Just to be sure ... are you trying this in the newest fedpkg-1.44 (currently update is waiting in the Bodhi). There was a related fix #492.
That did the job. Thanks for your help :)
Metadata Update from @opohorel: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
Metadata Update from @onosek: - Issue set to the milestone: 1.44