-
Notifications
You must be signed in to change notification settings - Fork 202
Description
🐛 The bug
I selected Sublime Text as my editor in the Nuxt devtools setting, but the file is not opened. Reading the exception on the console, this makes sense because apparently it tries to launch an executable named sublime, which does not exist. The expected executable name on Linux platform is subl, which is also configured as such in launch-editor.
The error:
The editor process exited with an error: spawn sublime ENOENT ('sublime' command does not exist in 'PATH').
Now, I do not know if this is an issue in launch-editor, but seeing how manually overriding the LAUNCH_EDITOR environment variable neither in the command that calls npm, nor in the .env file makes any difference, I suspect that the Nuxt devtools might be using this library incorrectly. I tried subl and sublime_text as values.
The library is invoked here:
| await import('launch-editor').then(r => (r.default || r)(path + suffix, editor)) |
🛠️ To reproduce
- Ensure Sublime Text is installed (or create a fake
sublexecutable on a Linux system) - Configure "Sublime Text" to be the editor in devtools.
- Try to open an file in your editor.
🌈 Expected behavior
The file is opened in my local Sublime Text editor.
ℹ️ Additional context
I am using Arch Linux and installed Sublime Text using the official repository. subl is available on my $PATH and works in the terminal.