Skip to content

Commit 5f15bd8

Browse files
committed
Add parameter to GitVersionHelper.ExecuteIn() so the log file can be made optional.
1 parent fbec8f4 commit 5f15bd8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/GitVersionExe.Tests/GitVersionHelper.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ public static ExecutionResults ExecuteIn(string workingDirectory,
1212
string execArgs = null,
1313
string projectFile = null,
1414
string projectArgs = null,
15-
bool isTeamCity = false)
15+
bool isTeamCity = false,
16+
bool logToFile = true)
1617
{
17-
var logFile = Path.Combine(workingDirectory, "log.txt");
18+
var logFile = logToFile ? Path.Combine(workingDirectory, "log.txt") : null;
1819
var args = new ArgumentBuilder(workingDirectory, exec, execArgs, projectFile, projectArgs, logFile, isTeamCity);
1920
return ExecuteIn(args);
2021
}
2122

2223

23-
public static ExecutionResults ExecuteIn(string workingDirectory, string arguments, bool isTeamCity = false)
24+
public static ExecutionResults ExecuteIn(string workingDirectory, string arguments, bool isTeamCity = false, bool logToFile = true)
2425
{
25-
var logFile = Path.Combine(workingDirectory, "log.txt");
26+
var logFile = logToFile ? Path.Combine(workingDirectory, "log.txt") : null;
2627
var args = new ArgumentBuilder(workingDirectory, arguments, isTeamCity, logFile);
2728
return ExecuteIn(args);
2829
}

0 commit comments

Comments
 (0)