todo-tree icon indicating copy to clipboard operation
todo-tree copied to clipboard

Bug: The extension errors when working with dotfiles

Open ppseprus opened this issue 1 year ago • 1 comments

Steps to Reproduce

  1. Open the Command Palette (Cmd + Shift + P) and hit "Profiles: Create Profile..." to create an empty VSCode profile with no extensions and no configurations
  2. Install the ToDo Tree extension
  3. Open the User settings.json, copy and paste the below settings and hit save
  4. Open a terminal and create a shell script (eg. .test), copy and paste the below code
  5. Open the shell script in VSCode

User settings.json

{
    "todo-tree.tree.scanMode": "open files",
    "todo-tree.general.tags": [ "TODO" ],
    "todo-tree.regex.regex": "((//|#|<!--|;|/\\*|^|^[ \\t]*(-|\\d+.))\\s*($TAGS))",
}

.test shell script

#!/usr/bin/bash

# TODO: something

exit 0

Expected Behaviour

The ToDo Tree extension highlights the comment with the tag.

Actual Behaviour

The ToDo Tree extension throws the below error and exits.

2024-06-21 11:33:00.402 [error] An error occurred when deactivating the subscriptions for extension 'Gruntfuggly.todo-tree':
2024-06-21 11:33:00.402 [error] AggregateError: Encountered errors while disposing of store
	at f (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:30:820)
	at u.eb (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:9991)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:7867
	at Array.map (<anonymous>)
	at u.$ (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:7854)
	at u.terminate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:159:8127)
	at f.terminate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:163:1513)
	at t (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:176:10459)
	at MessagePortMain.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:176:6675)
	at MessagePortMain.emit (node:events:514:28)
	at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)
2024-06-21 11:33:00.403 [info] Extension host with pid 15239 exiting with code 0
2024-06-21 11:33:01.162 [info] Extension host with pid 15975 started

Additional Information

The extension works on test.sh and test alike. Seems like it only errors when the filename starts with a dot.

ppseprus avatar Jun 21 '24 09:06 ppseprus