Browse Source

fix: Correct path resolution for .vite-port file in ClineProvider (#4007)

The ClineProvider was looking for the .vite-port file in the wrong location.
Updated the path resolution to correctly point to the project root where
the Vite development server creates the file.

Fixes: #4006

Signed-off-by: Eric Wheeler <[email protected]>
Co-authored-by: Eric Wheeler <[email protected]>
KJ7LNW 7 months ago
parent
commit
1e5bf74136
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/webview/ClineProvider.ts

+ 1 - 1
src/core/webview/ClineProvider.ts

@@ -557,7 +557,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
 		try {
 			const fs = require("fs")
 			const path = require("path")
-			const portFilePath = path.resolve(__dirname, "../.vite-port")
+			const portFilePath = path.resolve(__dirname, "../../.vite-port")
 
 			if (fs.existsSync(portFilePath)) {
 				localPort = fs.readFileSync(portFilePath, "utf8").trim()