Merge pull request #39 from devoncarew/path_issue
fix a path issue when creating new flutter apps
This commit is contained in:
@@ -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]) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user