Skip to content

Commit

Permalink
Create directory chain if doesn't exist for ef migrations bundle
Browse files Browse the repository at this point in the history
Fix #30123
  • Loading branch information
ilmalte authored and bricelam committed Mar 20, 2023
1 parent 4397cd2 commit 5844d95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ef/Commands/MigrationsBundleCommand.cs
Expand Up @@ -192,6 +192,12 @@ protected override int Execute(string[] args)
File.Delete(destination);
}

var destinationDir = Path.GetDirectoryName(destination);
if (!string.IsNullOrWhiteSpace(destinationDir))
{
Directory.CreateDirectory(destinationDir);
}

File.Move(
Path.Combine(publishPath, bundleName + exe),
destination);
Expand Down

0 comments on commit 5844d95

Please sign in to comment.