Skip to content

Commit c703b99

Browse files
committed
fix: use os.homedir() instead of vscode.env.userHome
1 parent a70da24 commit c703b99

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 fs from "fs/promises"
45
import pWaitFor from "p-wait-for"
56
import * as vscode from "vscode"
@@ -1507,9 +1508,9 @@ export const webviewMessageHandler = async (
15071508
rulesFolderPath = path.join(".roo", `rules-${message.slug}`)
15081509
}
15091510
} else {
1510-
// Global scope - use VSCode's environment variables
1511-
const homeDir = vscode.env.userHome
1512-
rulesFolderPath = vscode.Uri.joinPath(homeDir, ".roo", `rules-${message.slug}`).fsPath
1511+
// Global scope - use OS home directory
1512+
const homeDir = os.homedir()
1513+
rulesFolderPath = path.join(homeDir, ".roo", `rules-${message.slug}`)
15131514
}
15141515

15151516
// Check if the rules folder exists

0 commit comments

Comments
 (0)