fix: use os.homedir() for Windows compatibility
This commit is contained in:
@@ -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,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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user