@@ -49,7 +49,7 @@ Future<void> downloadWebAssets(List<String> arguments,
4949
5050 if (Platform .environment.containsKey ('IS_IN_POWERSYNC_CI' )) {
5151 print ('IS_IN_POWERSYNC_CI env variable is set, copying from local build' );
52- return _copyPrecompiled (Directory .current, wasmFileName);
52+ return _copyPrecompiled (Directory .current, wasmFileName, outputDir );
5353 }
5454
5555 try {
@@ -184,7 +184,8 @@ Future<void> downloadFile(
184184 }
185185}
186186
187- Future <void > _copyPrecompiled (Directory project, String wasmFile) async {
187+ Future <void > _copyPrecompiled (
188+ Directory project, String wasmFile, String outputDir) async {
188189 // Keep going up until we see the melos.yaml file indicating the workspace
189190 // root.
190191 var dir = project;
@@ -200,7 +201,7 @@ Future<void> _copyPrecompiled(Directory project, String wasmFile) async {
200201
201202 // In the CI, an earlier step will have put these files into the prepared
202203 // sqlite3_wasm_build package.
203- final destination = p.join (project.path, 'web' );
204+ final destination = p.join (project.path, outputDir );
204205 final wasmSource = p.join (dir.path, 'packages' , 'sqlite3_wasm_build' , 'dist' );
205206 print ('Copying $wasmFile from $wasmSource to $destination ' );
206207 await File (p.join (wasmSource, wasmFile)).copy (p.join (destination, wasmFile));
0 commit comments