beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.79k stars 1.82k forks source link

Support non-POSIX text editor file paths for Windows. #5142

Open sgunn80808 opened 6 months ago

sgunn80808 commented 6 months ago

Description

Fixes issue with shlex.split parsing Windows editor program file paths as POSIX.

This resulted in the following error for a program located in C:\Program Files when running beet edit

error: could not run editor command 'C:Program': [WinError 2] The system cannot find the file specified

Setting posix = not is_windows changes the default parsing mode of shlex for Windows platform and allows Windows file paths to be used to specify the text editor.

To Do

sgunn80808 commented 6 months ago

I marked Tests as non-mandatory because I couldn't find a good place to add a test for this change. Please comment here if you have any suggestions for where a test should go and I can add one. Thanks!