microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.1k stars 28.82k forks source link

Tasks being detected from gitignored directories #214669

Open musjj opened 3 months ago

musjj commented 3 months ago

Does this issue occur when all extensions are disabled?: Yes/No

I'm using direnv with nix-direnv which sets up a dev environment for the local directory (including installing tools/packages, etc.).

As a side effect, direnv caches a lot of files under a .direnv directory which I usually put into my .gitignore. But the problem is that VS Code still detects tasks from the directory despite it being excluded from the VCS.

This ends up polluting my task list with a lot of irrelevant stuff:

image

Steps to Reproduce:

  1. Put a file that can be detected as a task into a hidden directory (package.json's scripts, etc.).
  2. Press Ctrl+Shift+B to open the task list.
VSCodeTriageBot commented 3 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.90.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

Srekel commented 3 months ago

I just updated to 1.90.0 and it started happening to me. image

Here is the content of my gitignore:

zig-cache/
zig-out/
external/
content/imgui.ini
content/heightmap/*
content/audio/*
content/patch
content/textures
content/meshes
content/prefabs
.svn
design
content/content.csv
promotion/
__pycache__/
licenses.txt
release_build/*
binaries/
imgui.ini