Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code tasks fail with error "Cannot read properties of undefined (reading 'shell')" #56

Open
apgrucza opened this issue May 21, 2023 · 7 comments
Labels
type: bug Something not working as intended.

Comments

@apgrucza
Copy link

apgrucza commented May 21, 2023

When the extension is enabled, tasks defined in .vscode/tasks.json fail to run. For example:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "echo",
            "type": "shell",
            "command": "echo Hello"
        }
    ]
}

When using the Tasks: Run Task command and selecting the echo task, this error pops up:

Cannot read properties of undefined (reading 'shell')
  • Task version: 3.24.0
  • Operating System: Windows
@apgrucza apgrucza changed the title VS Code tasks (fail with VS Code tasks fail with error "Cannot read properties of undefined (reading 'shell')" May 21, 2023
@ilkka
Copy link

ilkka commented Sep 11, 2023

Broken in the same way for me as well, on Linux, with the latest snap version of vs code.

@shalauko
Copy link

Same for me on native Windows 10 and in WSL2 (Ubuntu 22.04).
Is there some workaround available?

@polamjag
Copy link

polamjag commented Jan 5, 2024

Same for me on native macOS (14.2.1 (23C71)) and VS Code 1.85.1 (Universal).

@pd93 pd93 added the type: bug Something not working as intended. label Apr 5, 2024
@siberianbot
Copy link

Hi! Are there any updates on this?

@3uclid3
Copy link

3uclid3 commented Jun 9, 2024

I'm using 'code workspace' with multiple project in it. (multiple taskfiles)

I have more than 1 default build task.
If I'm being ask by vscode to choose, it fails with the error.
If I remove the other tasks and don't have to choose, it work fine.

@MrVermond
Copy link

Same here.
So the extension just breaks the vscode tasks feature and is therefore not usable.

@ssbarnea
Copy link

ssbarnea commented Jun 27, 2024

@pd93 Apparently vscode-task extension does break native vscode ability to run tasks (unrelated to taskfile). See them documented at https://code.visualstudio.com/docs/editor/tasks#vscode

When this extension is installed we can see the error described by the OP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something not working as intended.
Projects
None yet
Development

No branches or pull requests

9 participants