Amplify-cli: Support for WSL - Selected default editor not found

Created on 6 Dec 2018  路  5Comments  路  Source: aws-amplify/amplify-cli

Describe the bug
On Ubuntu for Windows 10 (WSL), after doing amplify init, I selected Sublime Text as the default editor, which is installed on my Windows filesystem. When trying to update the GraphQL schema through the console -- which I believe just launches your selected editor with the relevant file created and opened? -- I get the error "Selected default editor not found in your machine."

I think this must have something to do with Amplify looking for an Ubuntu build of Sublime as opposed to the Windows version.

To Reproduce
Steps to reproduce the behavior:

  1. Install Ubuntu for Windows, Node, npm, Amplify, and Amplify CLI on Ubuntu distro. Install Sublime for Windows.
  2. amplify init your app, select Sublime Text as your editor.
  3. amplify add api and select Yes when asked to edit schema
  4. See error

Expected behavior
Editor launched with file opened.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows 10, Ubuntu running on Windows Subsystems for Linux

Additional Context
The Amplify app is in the Windows filesystem, which can be navigated to via the /mnt/ Linux directory. Most Amplify functionality works with this setup.

bug windows

Most helpful comment

I encounter the same problem using git bash inside vscode

Same issue. Not in WSL, standard Windows with Git Bash inside VS Code

All 5 comments

Is it really an Amplify bug if the issue is caused by using an Ubuntu shell to access an Amplify app in a Windows filesystem? Dunno, @yuth please reopen if you feel it warrants.

Same issue - Press enter to continue Selected editor vscode was not found in your machine.

i think a lot of people run windows 10 with WSL

is there some structural issue as to why amplify would be unable to open my default text editor? in the same terminal window where i'm running amplify, i can type "code" and open visual studio code

Agreed that WSL should be a supported platform.

I encounter the same problem using git bash inside vscode

I encounter the same problem using git bash inside vscode

Same issue. Not in WSL, standard Windows with Git Bash inside VS Code

Was this page helpful?
0 / 5 - 0 ratings