vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Path with ( causes "SyntaxError: Invalid regular expression" duplicate of #3475 in redhat-developer/vscode-java

Open h-brockmann opened this issue 4 months ago • 0 comments

Same error already issued in vscode-java#3475 https://github.com/redhat-developer/vscode-java/issues/3475

Describe the bug

Due to naming conventions and limitations of windows, my username has an opening bracket in it. This bracket causes a SyntaxError since the path to %APPDATA% gets evaluated as regular Expression

2024-10-15 12:38:07.237 [error] Activating extension redhat.java failed due to an error:
2024-10-15 12:38:07.237 [error] SyntaxError: Invalid regular expression: /c:\Users\myName(Gro\AppData\Roaming\Code\User\workspaceStorage\XXxXXXXXXxxXxxxXXXxXXxxXxXxXXXXx\redhat.java\client.log.2024-10-15/: Unterminated group
	at String.match (<anonymous>)
	at c.getStream (c:\Users\myName(Gro\.vscode\extensions\redhat.java-1.35.1-win32-x64\dist\extension.js:2:293676)
	at new f (c:\Users\myName(Gro\.vscode\extensions\redhat.java-1.35.1-win32-x64\dist\extension.js:2:1418356)
	at t.initializeLogFile (c:\Users\myName(Gro\.vscode\extensions\redhat.java-1.35.1-win32-x64\dist\extension.js:2:940453)
	at c:\Users\myName(Gro\.vscode\extensions\redhat.java-1.35.1-win32-x64\dist\extension.js:2:899088
	at Generator.next (<anonymous>)
	at s (c:\Users\myName(Gro\.vscode\extensions\redhat.java-1.35.1-win32-x64\dist\extension.js:2:890832)
2024-10-15 12:38:07.364 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource.
2024-10-15 12:38:07.467 [info] Eager extensions activated

Expected Behavior

No Error

Current Behavior

Error visible

Steps to Reproduce

Have opening bracket in user path

Environment

  • [X] Windows
  • [ ] Mac
  • [ ] Linux
  • [ ] other (please specify)

h-brockmann avatar Oct 15 '24 10:10 h-brockmann