fix: use os.homedir() for Windows compatibility

This commit is contained in:
Tommy D. Rossi
2025-11-28 17:21:55 +01:00
parent 3ce41b0263
commit 30d3a84494
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## 0.0.13
### Patch Changes
- **Fixed home directory expansion on Windows**: Use `os.homedir()` instead of `process.env.HOME` for `~` path expansion in browser-config.ts, which doesn't exist on Windows.
## 0.0.12
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "playwriter",
"description": "",
"version": "0.0.12",
"version": "0.0.13",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
+1 -1
View File
@@ -52,7 +52,7 @@ function findChromeExecutablePath(): string {
})()
for (const path of paths) {
const resolvedPath = path.startsWith('~') ? path.replace('~', process.env.HOME || '') : path
const resolvedPath = path.startsWith('~') ? path.replace('~', os.homedir()) : path
if (fs.existsSync(resolvedPath)) {
return resolvedPath
}