Unfortunately this is still prompting the user with a window to commit when
I try this and does not log an error.
int val;
if (!int.TryParse(Console.ReadLine(), out val))
{
Console.Error.WriteLine("Please enter a number");
return;
}
On Friday, December 8, 2017 at 11:39:36 PM UTC-8, Stefan wrote:
>
>
>
> On Thursday, December 7, 2017 at 9:07:44 PM UTC+1, Void wrote:
>>
>> I'm looking for a way to cancel a pre commit hook on a error. I only want
>> the user to enter a number between 1 and 2 and if it's not I need to cancel
>> the commit, how can I do this?
>>
>> int val;
>> if (!int.TryParse(Console.ReadLine(), out val))
>> {
>> Console.Error.WriteLine("Please enter a number");
>> return;
>> }
>>
>>
> If there's something written to the console error, the script will read
> that and show it to the user. But only if the hook script is configured
> with "wait for the script to finish".
>
>
--
You received this message because you are subscribed to the Google Groups
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tortoisesvn/0632058d-cd9e-46ef-be9a-63c11b387450%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.