Skip to content

Commit 6d4e2c0

Browse files
committed
Catching exception
1 parent e42a011 commit 6d4e2c0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Diff for: build/Build/Lifetime.cs

+8-4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@ public override void Setup(Context context, ISetupContext info)
1919
context.Information("Setting things up...");
2020

2121
context.CleanDirectory(context.General.ArtifactsDir.AsDirectoryPath());
22-
context.Information("Cleaned directory");
23-
2422
context.General.IsLocal = context.BuildSystem().IsLocalBuild;
25-
context.Information("Determined if local build");
2623

27-
SetBranchInContext(context);
24+
try
25+
{
26+
SetBranchInContext(context);
27+
}
28+
catch (Exception ex)
29+
{
30+
context.Error(ex);
31+
}
2832

2933
context.Information(string.Join(Environment.NewLine, context.Environment.GetEnvironmentVariables()));
3034
}

0 commit comments

Comments
 (0)