From 0b2a946b237de1ee66ca87c0ee3f446696676d03 Mon Sep 17 00:00:00 2001 From: James Robinson Date: Thu, 17 Sep 2015 15:27:30 -0700 Subject: [PATCH] Prepend mojo shebang to skyx files skyx files are zips, so they can have anything at the start. Having a shebang line at the start makes it easier to run skyx files in a mojo environment. --- packages/flutter_tools/lib/src/build.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/build.dart b/packages/flutter_tools/lib/src/build.dart index f9368e5585..55052ab60e 100644 --- a/packages/flutter_tools/lib/src/build.dart +++ b/packages/flutter_tools/lib/src/build.dart @@ -174,7 +174,8 @@ class BuildCommandHandler extends CommandHandler { } File outputFile = new File(results['output-file']); - await outputFile.writeAsBytes(new ZipEncoder().encode(archive)); + await outputFile.writeAsString('#!mojo mojo:sky_viewer\n') + await outputFile.writeAsBytes(new ZipEncoder().encode(archive), mode: FileMode.APPEND); return 0; } }