diff --git a/CHANGELOG.md b/CHANGELOG.md index 8816e2d..7e3bf35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2.1.7+1 +* Fix a bug where new directories were not being created in +`init`. + # 2.1.7 * Fix a bug where `ArgResults.arguments` was used in `init` instead of the intended `ArgResults.rest`. diff --git a/lib/src/util.dart b/lib/src/util.dart index af6f838..a294d40 100644 --- a/lib/src/util.dart +++ b/lib/src/util.dart @@ -35,11 +35,12 @@ Future copyDirectory(Directory source, Directory destination) async { if (entity is Directory) { var newDirectory = Directory(p.join(destination.absolute.path, p.basename(entity.path))); - await newDirectory.create(); + await newDirectory.create(recursive: true); await copyDirectory(entity.absolute, newDirectory); } else if (entity is File) { var newPath = p.join(destination.path, p.basename(entity.path)); // print(darkGray.wrap('\rCopying file "${entity.path}" -> "$newPath"')); + await File(newPath).create(recursive: true); await entity.copy(newPath); } } diff --git a/pubspec.yaml b/pubspec.yaml index d024c56..34ab6e6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ author: Tobe O description: Command-line tools for the Angel framework, including scaffolding. homepage: https://github.com/angel-dart/angel_cli name: angel_cli -version: 2.1.7 +version: 2.1.7+1 dependencies: analyzer: ">=0.32.0 <2.0.0" args: ^1.0.0