Skip to content
This repository was archived by the owner on Nov 7, 2019. It is now read-only.

Commit 529f47f

Browse files
freljungstajs
authored andcommitted
Fixed fail during Fix caused build to fail (#58)
Name for fake-csproj changed to <project>.fake try finally around work to always clean up fake-file
1 parent 77f1ee1 commit 529f47f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/SpecFlow.NetCore/Fixer.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,14 @@ public void Fix(DirectoryInfo directory)
7171

7272
var csproj = GetCsProj(directory);
7373
var fakeCsproj = SaveFakeCsProj(directory, csproj);
74-
GenerateSpecFlowGlue(directory, fakeCsproj, csproj);
75-
DeleteFakeCsProj(fakeCsproj);
74+
try
75+
{
76+
GenerateSpecFlowGlue(directory, fakeCsproj, csproj);
77+
}
78+
finally
79+
{
80+
DeleteFakeCsProj(fakeCsproj);
81+
}
7682
FixTests(directory);
7783

7884
if (missingGeneratedFiles.Any())
@@ -205,7 +211,7 @@ private FileInfo SaveFakeCsProj(DirectoryInfo directory, FileInfo csproj)
205211
var content = sb.ToString();
206212
WriteLine(content);
207213

208-
var fakecsprojPath = csproj.FullName + ".fake.csproj";
214+
var fakecsprojPath = csproj.FullName + ".fake";
209215
WriteLine("Saving: " + fakecsprojPath);
210216
File.WriteAllText(fakecsprojPath, content);
211217

0 commit comments

Comments
 (0)