Skip to content

Some file related variables don't resolve for integrated terminal with JSON file open #78247

@gregvanl

Description

@gregvanl
  • VSCode Version: 1.37.0 Insiders
  • OS Version: Windows 10

Found will testing #78122

Steps to Reproduce:

Use:

"terminal.integrated.shellArgs.windows": ["/K", "echo", "${file}"],

If you have a Markdown file, you will see the file variable echoed when the terminal is created.
If you open a JSON file, like settings.json, the terminal creation hangs on an empty terminal.

The DevTools output is:

ERR '${file}' can not be resolved. Please open an editor.: Error: '${file}' can not be resolved. Please open an editor.
at u (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2853:268)
at Proxy.evaluateSingleVariable (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2854:533)
at t.replace (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2853:55)
at String.replace ()
at Proxy.resolveString (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2853:10)
at Proxy.recursiveResolve (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2852:716)
at Proxy.resolve (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2851:851)
at Object.t.getDefaultShellArgs (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:2782:338)
at Proxy.getDefaultShellAndArgs (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:3549:615)
at y. (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:3962:856)
at Generator.next ()
at file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:35:460
at new Promise ()
at n (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:35:237)
at y._launchProcess (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:3962:253)
at y. (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:3961:221)
at Generator.next ()
at file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:35:460
at new Promise ()
at n (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:35:237)
at y.createProcess (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:3960:356)
at setTimeout (file:///C:/Users/gregvanl/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:3984:268)

Even worse: If you try to close one of the hung terminals, VS Code will hang and you'll get the Reopen/Wait/Close dialog.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions