From 1532005ee619b5fd0ed33a6444408a921b4c6b0e Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Tue, 22 Sep 2015 10:53:55 -0700 Subject: [PATCH] fix a path issue when creating new flutter apps --- packages/flutter_tools/lib/src/common.dart | 3 ++- packages/flutter_tools/lib/src/init.dart | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/common.dart b/packages/flutter_tools/lib/src/common.dart index c3e1ba18c6..ee65ebd56b 100644 --- a/packages/flutter_tools/lib/src/common.dart +++ b/packages/flutter_tools/lib/src/common.dart @@ -14,7 +14,8 @@ abstract class CommandHandler { ArgParser get parser; - /// @return 0 for no errors or warnings executing command, 1 for warnings, 2 for errors. + /// Returns 0 for no errors or warnings executing command, 1 for warnings, 2 + /// for errors. Future processArgResults(ArgResults results); void printUsage([String message]) { diff --git a/packages/flutter_tools/lib/src/init.dart b/packages/flutter_tools/lib/src/init.dart index 21def3b427..105908ac05 100644 --- a/packages/flutter_tools/lib/src/init.dart +++ b/packages/flutter_tools/lib/src/init.dart @@ -89,6 +89,7 @@ abstract class Template { files.forEach((String path, String contents) { Map m = {'projectName': projectName, 'description': description}; contents = mustache.render(contents, m); + path = path.replaceAll('/', Platform.pathSeparator); File file = new File(p.join(dir.path, path)); file.parent.createSync(); file.writeAsStringSync(contents);