Skip to content

Commit cf89dcd

Browse files
authored
fix: fix go to source file whose path contains $ symbol (#450)
* fix: fix go to source when file name contains $ symbol * chore: add changeset
1 parent 8fdc016 commit cf89dcd

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/floppy-mammals-write.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/devtools-vite': patch
3+
---
4+
5+
fix go to source file whose path contains $ symbol

packages/devtools-vite/src/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const DEFAULT_EDITOR_CONFIG: EditorConfig = {
2828
open: async (path, lineNumber, columnNumber) => {
2929
const launch = (await import('launch-editor')).default
3030
launch(
31-
`${path.replaceAll('$', '\\$')}${lineNumber ? `:${lineNumber}` : ''}${columnNumber ? `:${columnNumber}` : ''}`,
31+
`${path}${lineNumber ? `:${lineNumber}` : ''}${columnNumber ? `:${columnNumber}` : ''}`,
3232
undefined,
3333
(filename, err) => {
3434
console.warn(`Failed to open ${filename} in editor: ${err}`)

0 commit comments

Comments
 (0)