File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,7 @@ CommonDatabase openTestDatabase() {
1414 return DynamicLibrary .open ('libsqlite3.so.0' );
1515 });
1616 sqlite_open.open.overrideFor (sqlite_open.OperatingSystem .macOS, () {
17- return DynamicLibrary .open (
18- '/opt/homebrew/Cellar/sqlite/3.48.0/lib/libsqlite3.dylib' );
17+ return DynamicLibrary .open ('libsqlite3.dylib' );
1918 });
2019 var lib = DynamicLibrary .open (getLibraryForPlatform (path: libPath));
2120 var extension = SqliteExtension .inLibrary (lib, 'sqlite3_powersync_init' );
@@ -24,6 +23,8 @@ CommonDatabase openTestDatabase() {
2423}
2524
2625String getLibraryForPlatform ({String ? path = "." }) {
26+ // Using an absolute path is required for macOS, where Dart can't dlopen
27+ // relative paths due to being a "hardened program".
2728 return p.normalize (p.absolute (switch (Abi .current ()) {
2829 Abi .androidArm ||
2930 Abi .androidArm64 ||
You can’t perform that action at this time.
0 commit comments