Skip to content

Conditionally running a git hook or command #45

Answered by alirezanet
forrestab asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @forrestab,

In the CSX files, you can return an exception or non-zero exit code to break the execution (e.g if (some condition) return 1),

var x = Process.Start("dotnet", "test src/IntegrationTests/");
x.WaitForExit();
return x.ExitCode;

but this is an interesting problem, I'll look for an easier way to handle this soon, feel free to open an issue if you have any suggestions to make this operation easier.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@forrestab
Comment options

@alirezanet
Comment options

Answer selected by forrestab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants