Skip to content

Commit 6a79a21

Browse files
authored
Merge pull request #5 from antonbashir/fixes
fix pack
2 parents afc17a0 + 47dc536 commit 6a79a21

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

binding/dart/bin/pack.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ Future<void> main(List<String> arguments) async {
3333
final packageRoot = findPackageRoot(dotDartTool);
3434
final resultPackageRoot = Directory(root.toFilePath() + Directories.package);
3535
if (resultPackageRoot.existsSync()) resultPackageRoot.deleteSync(recursive: true);
36+
if (!resultPackageRoot.existsSync()) resultPackageRoot.createSync();
3637
if (native) {
3738
final packageNativeRoot = Directory(packageRoot.toFilePath() + Directories.native);
3839
final nativeRoot = Directory(root.toFilePath() + Directories.native);
39-
if (!resultPackageRoot.existsSync()) resultPackageRoot.createSync();
40-
copyLibrary(packageNativeRoot, resultPackageRoot);
41-
compileNative(nativeRoot, packageNativeRoot, projectName);
42-
if (nativeRoot.existsSync()) copyNative(nativeRoot, projectName, resultPackageRoot);
40+
if (nativeRoot.existsSync()) {
41+
copyLibrary(packageNativeRoot, resultPackageRoot);
42+
compileNative(nativeRoot, packageNativeRoot, projectName);
43+
copyNative(nativeRoot, projectName, resultPackageRoot);
44+
}
4345
}
4446
if (lua) {
4547
final luaRoot = Directory(root.toFilePath() + Directories.lua);

0 commit comments

Comments
 (0)