mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
fix a path issue when creating new flutter apps
This commit is contained in:
parent
542da8ccd5
commit
1532005ee6
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue