Skip to content

Commit 5844d95

Browse files
ilmaltebricelam
authored andcommitted
Create directory chain if doesn't exist for ef migrations bundle
Fix #30123
1 parent 4397cd2 commit 5844d95

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ef/Commands/MigrationsBundleCommand.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ protected override int Execute(string[] args)
192192
File.Delete(destination);
193193
}
194194

195+
var destinationDir = Path.GetDirectoryName(destination);
196+
if (!string.IsNullOrWhiteSpace(destinationDir))
197+
{
198+
Directory.CreateDirectory(destinationDir);
199+
}
200+
195201
File.Move(
196202
Path.Combine(publishPath, bundleName + exe),
197203
destination);

0 commit comments

Comments
 (0)