Skip to content

Commit

Permalink
fix(aft): Delete output dir before generating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Apr 8, 2023
1 parent 55596dc commit c6fc0fd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ class GenerateSdkCommand extends AmplifyCommand {

final outputPath = args['output'] as String;
final outputDir = Directory(p.join('lib', outputPath));
if (!await outputDir.exists()) {
await outputDir.create(recursive: true);
if (await outputDir.exists()) {
await outputDir.delete(recursive: true);
}
await outputDir.create(recursive: true);

final smithyModel = SmithyAstBuilder();

Expand Down

0 comments on commit c6fc0fd

Please sign in to comment.