Can't set editor to windows program when using the WSL

This is revised over from a github issue I posted of the same name. I was unable to access the forum at the time, so I hoped I could list the issue as a bug rather than just a normal support question :slight_smile:.

In the command line version of Joplin installed on the WSL, I'm having trouble making it use a specific editor installed on Windows. Consider the following:

:config editor "/mnt/c/Program Files/Sublime Text 3/subl.exe"
:config editor "/mnt/c/Program\ Files/Sublime\ Text\ 3/subl.exe"
:config editor "/mnt/c/Program\\ Files/Sublime\\ Text\\ 3/subl.exe"
:config editor "\"/mnt/c/Program Files/Sublime Text 3/subl.exe\""
:config editor "'/mnt/c/Program Files/Sublime Text 3/subl.exe'"
:config editor '"/mnt/c/Program Files/Sublime Text 3/subl.exe"'

All of these produce an error along the lines of

edit: Error opening note in editor: spawnSync /mnt/c/Program\ ENOENT

I also tried adding the .exe to my WSL PATH (potentially a different bug)

export PATH=$PATH:/mnt/c/Program\ Files/Sublime\ Text\ 3/

which allows subl.exe to be called from the cli, but still produces the following error for Joplin:

:config editor "subl.exe"
edit: Error opening note in editor: spawnSync subl.exe ENOENT

Environment

Joplin version: 1.0.149 (CLI)
Platform: Windows 10 1903
OS specifcs: WSL Ubuntu 18.04

Steps To Reproduce

  1. Install Sublime Text 3 on Windows
  2. Install the Ubuntu flavor of WSL
  3. Install Joplin CLI in the WSL
  4. Try to configure subl.exe as Joplin's note editor

There also seems to be a related post on this forum here, though it didn't seem to go anywhere unfortunately.