fix a path issue when creating new flutter apps

This commit is contained in:
Devon Carew 2015-09-22 10:53:55 -07:00
parent 542da8ccd5
commit 1532005ee6
2 changed files with 3 additions and 1 deletions

View file

@ -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<int> processArgResults(ArgResults results);
void printUsage([String message]) {

View file

@ -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);