Skip to content

Commit 8dac914

Browse files
committed
Use latest ndk version by sorting directories in descending order
Uses simple lexicographical, so no guarantees that it will work in all cases, but should be good enough for most. Expectation is that users will have only one or two versions of NDK installed, or user should manually set the path if multiple versions are installed.
1 parent 615aa21 commit 8dac914

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/androidPaths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async function getNdkRoot(sdkRoot: string, customNdkRoot?: string): Promise<stri
9898
}
9999

100100
try {
101-
let files = (await fsPromises.readdir(root)).map((f) => path.join(root, f));
101+
let files = (await fsPromises.readdir(root)).sort().reverse().map((f) => path.join(root, f));
102102
for (let file of files) {
103103
if (await isValidNdkRoot(file)) {
104104
return file;

0 commit comments

Comments
 (0)