Skip to content

Commit 966fd98

Browse files
committed
r registry detection: read hkcu before hklm
1 parent 923613f commit 966fd98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/resources.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ export async function rBinaryPath(binary: string): Promise<string> {
8282
if (Deno.build.os === "windows") {
8383
// determine current version
8484
const version = await registryReadString(
85-
[kHKeyLocalMachine, kHKeyCurrentUser],
85+
[kHKeyCurrentUser, kHKeyLocalMachine],
8686
"Software\\R-core\\R",
8787
"Current Version",
8888
);
8989
// determine path to version
9090
if (version) {
9191
const installPath = await registryReadString(
92-
[kHKeyLocalMachine, kHKeyCurrentUser],
92+
[kHKeyCurrentUser, kHKeyLocalMachine],
9393
`Software\\R-core\\R\\${version}`,
9494
"InstallPath",
9595
);

0 commit comments

Comments
 (0)