Skip to content

Commit 964af43

Browse files
hannesrudolphdaniel-lxs
authored andcommitted
fix: use os.homedir() instead of vscode.env.userHome
1 parent ad8ea06 commit 964af43

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/core/webview/webviewMessageHandler.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { safeWriteJson } from "../../utils/safeWriteJson"
22
import * as path from "path"
3+
import * as os from "os"
34
import * as fs from "fs/promises"
45
import pWaitFor from "p-wait-for"
56
import * as vscode from "vscode"
@@ -1516,9 +1517,9 @@ export const webviewMessageHandler = async (
15161517
rulesFolderPath = path.join(".roo", `rules-${message.slug}`)
15171518
}
15181519
} else {
1519-
// Global scope - use VSCode's environment variables
1520-
const homeDir = vscode.env.userHome
1521-
rulesFolderPath = vscode.Uri.joinPath(homeDir, ".roo", `rules-${message.slug}`).fsPath
1520+
// Global scope - use OS home directory
1521+
const homeDir = os.homedir()
1522+
rulesFolderPath = path.join(homeDir, ".roo", `rules-${message.slug}`)
15221523
}
15231524

15241525
// Check if the rules folder exists

0 commit comments

Comments
 (0)