Joevin Posted October 11, 2021 Report Share Posted October 11, 2021 Hello, I want to create a before-clientcheckin Trigger to check if user don't push changed empty files. For that i have created a C# dll that i run with dotnet I have created my trigger like that : cm trigger create before-clientcheckin "Check Empty Files" "dotnet MyLocalServer/MyDLL.dll" From that script i want to access to the standart input to get the list of pending changes. I assume it passed as arguments for the scripts but in my script i have nothing. my script is just a simple scripts and i there i'm just copy the arguments in a txt file for testing : using System; static int Main(string[] args) { return 0; } At this point i don't know what a can do to get the Standard Output. How can i do ? BR, Joevin Link to comment Share on other sites More sharing options...
ollieblanks Posted October 20, 2021 Report Share Posted October 20, 2021 Hi, If you are using C#, you can use Console.In to access stdin. Or Console.ReadLine() which is just a shortcut for Console.In.ReadLine(). Hope this helps! Link to comment Share on other sites More sharing options...
Joevin Posted October 27, 2021 Author Report Share Posted October 27, 2021 Hi, Thanks for your reply, it's really helping. Now that I have my input from my trigger, I have the feeling of having bad information given by plastic. I made a change on a file and checking it. The before-clientcheckin return me something like that CH "MyWorkspacePath" DIR I was expecting to have like a list of change or something like a "cm status" command Do you know if it's the expected behavior or a problem ? Br, Joevin Link to comment Share on other sites More sharing options...
ollieblanks Posted November 4, 2021 Report Share Posted November 4, 2021 Hey @Joevin, This is because you are only reading the first line. If you want to get the entire standard input as one long string then please use... Console.In.ReadToEnd(); Hope this helps! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now