Skip to content

Commit

Permalink
fix logs dumped when not requested
Browse files Browse the repository at this point in the history
  • Loading branch information
pchalamet committed May 31, 2024
1 parent 48ac243 commit 49180a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Terrabuild/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ let processCommandLine (parser: ArgumentParser<TerrabuildArgs>) (result: ParseRe
mermaid |> IO.writeTextFile (logFile "buildgraph.mermaid")

if options.WhatIf then
if logs then Logs.dumpLogs graph cache sourceControl None
if logs then
Logs.dumpLogs graph cache sourceControl None
0
else
let buildNotification = Notification.BuildNotification() :> Build.IBuildNotification
Expand All @@ -106,7 +107,8 @@ let processCommandLine (parser: ArgumentParser<TerrabuildArgs>) (result: ParseRe
let jsonBuild = Json.Serialize build
jsonBuild |> IO.writeTextFile (logFile "build.json")

Logs.dumpLogs graph cache sourceControl (Some build.ImpactedNodes)
if logs then
Logs.dumpLogs graph cache sourceControl (Some build.ImpactedNodes)

if build.Status = Build.Status.Success then 0
else 5
Expand Down

0 comments on commit 49180a7

Please sign in to comment.