mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-17 10:34:27 +00:00
fix: pass user data dir to WXT when using dev:watch --new (#403)
The --new flag creates a fresh temp profile directory but WXT's chromiumProfile was hardcoded to /tmp/browseros-dev, ignoring it. Pass BROWSEROS_USER_DATA_DIR env var from the Go dev tool and read it in web-ext.config.ts. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,7 @@ export default defineWebExtConfig({
|
||||
'/Applications/BrowserOS.app/Contents/MacOS/BrowserOS',
|
||||
},
|
||||
chromiumArgs,
|
||||
chromiumProfile: '/tmp/browseros-dev',
|
||||
chromiumProfile: env.BROWSEROS_USER_DATA_DIR || '/tmp/browseros-dev',
|
||||
keepProfileChanges: true,
|
||||
startUrls: ['chrome://newtab'],
|
||||
})
|
||||
|
||||
@@ -74,6 +74,7 @@ func runWatch(cmd *cobra.Command, args []string) error {
|
||||
fmt.Println()
|
||||
|
||||
env := proc.BuildEnv(p, "development")
|
||||
env = append(env, fmt.Sprintf("BROWSEROS_USER_DATA_DIR=%s", userDataDir))
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user