Skip to content

Commit 56b7176

Browse files
authored
fix(dev): prevent double URL encoding in server.open on macOS (#18443)
1 parent 7eeb6f2 commit 56b7176

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/vite/src/node/server/openBrowser.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ async function startBrowserProcess(
9696
if (openedBrowser) {
9797
// Try our best to reuse existing tab with AppleScript
9898
await execAsync(
99-
`osascript openChrome.applescript "${encodeURI(
100-
url,
101-
)}" "${openedBrowser}"`,
99+
`osascript openChrome.applescript "${url}" "${openedBrowser}"`,
102100
{
103101
cwd: join(VITE_PACKAGE_DIR, 'bin'),
104102
},

0 commit comments

Comments
 (0)