We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee7c38e commit 74387b8Copy full SHA for 74387b8
dart/test/utils/native_test_utils.dart
@@ -1,4 +1,5 @@
1
import 'dart:ffi';
2
+import 'dart:io';
3
4
import 'package:sqlite3/common.dart';
5
import 'package:sqlite3/open.dart' as sqlite_open;
@@ -15,6 +16,12 @@ void applyOpenOverride() {
15
16
return DynamicLibrary.open('libsqlite3.so.0');
17
});
18
sqlite_open.open.overrideFor(sqlite_open.OperatingSystem.macOS, () {
19
+ // Prefer using Homebrew's SQLite which allows loading extensions.
20
+ const fromHomebrew = '/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib';
21
+ if (File(fromHomebrew).existsSync()) {
22
+ return DynamicLibrary.open(fromHomebrew);
23
+ }
24
+
25
return DynamicLibrary.open('libsqlite3.dylib');
26
27
}
0 commit comments