Skip to content

workspace.workspaceFolders API should return undefined when no folder is open #8640

@azatsarynnyy

Description

@azatsarynnyy

Bug Description:

workspace.workspaceFolders Plugin API should return undefined when no folder is open. But it returns an empty array. It leads to the failure of some VS Code extensions that rely on undefined value.

Steps to Reproduce:

  1. Put the test plugin into the plugins folder and run Theia.
  2. Call Hello World command from the Commands Palette when no workspace folder is opened.
  3. It shows the message ws api returns 0 workspace folders, but has to show no workspace folders as it is in VS Code.

Additional Information

  • Operating System:
  • Theia Version: 1.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Team: Che-Editorsissues regarding the che-editors teambugbugs found in the applicationplug-in systemissues related to the plug-in systemvscodeissues related to VSCode compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions