Tyriar / vscode-windows-terminal

VS Code integration with Windows Terminal
https://marketplace.visualstudio.com/items?itemName=Tyriar.windows-terminal
MIT License
33 stars 8 forks source link

Cannot read property 'map' of undefined #7

Closed warpdesign closed 4 years ago

warpdesign commented 4 years ago

I opened VSCode in a WSL directory, then right clicked on a folder and chose "Open in Windows Terminal" and got this error:

Could not launch Windows Terminal: Cannot read property 'map' of undefined

Tyriar commented 4 years ago

@warpdesign are you using the preview and didn't have stable installed? This might be https://github.com/Tyriar/vscode-windows-terminal/issues/6

warpdesign commented 4 years ago

I'm using the stable build.

Looking at the extension code it seems it expects a list array with the profiles in the terminal json settings file:

const defaultProfile = settings.profiles.list.find(p => p.guid === settings.defaultProfile)

Problem is in my settings file, profiles is the array containing the profiles:

{ profiles: [ ...

There is no profiles.list property.

I guess this explains the crash.

Tyriar commented 4 years ago

I guess the schema changed at one point, can add support for both 👍