Getting Real-Time output when running salesforce cli command #214
Replies: 3 comments 15 replies
-
Just to test, if you run |
Beta Was this translation helpful? Give feedback.
-
Your solution is working fine thanks :) Do you know how to Encoding UTF8 With BOM? |
Beta Was this translation helpful? Give feedback.
-
This is my Powershell script :
C# :
Result when using UnicodeToUTF8 method: Result when using ConvertStringToUtf8Bom method: Result expected : I don't know how to convert :/ |
Beta Was this translation helpful? Give feedback.
-
I have an app that uses the salesforce cli and I want to send what you would get when running the command manually in the Powershell window to a textbox on the screen. I call the command using observe, but the only event that gets triggered is started or stdErr. I never see a StdOut command trigger, but I can open the log file for the command in notepad++ and see that it is running.
My only thought is it has something to do with how Salesforce CLI is writing to the console, but I need to figure out how to solve it. I tried doing a file system watcher event on the log file, but that causes the command to fail even if I open it in read-only.
The output when running the command in powershell
![image](https://private-user-images.githubusercontent.com/3030358/256924106-351f33da-6b49-47e6-9a36-e83ba5ec2618.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzQ2MTcyNDIsIm5iZiI6MTczNDYxNjk0MiwicGF0aCI6Ii8zMDMwMzU4LzI1NjkyNDEwNi0zNTFmMzNkYS02YjQ5LTQ3ZTYtOWEzNi1lODNiYTVlYzI2MTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MTIxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDEyMTlUMTQwMjIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NzEyMWYxMDJhMzI0NzZiMTdhMGE1ZjJhNTgzNDIzODYxODgzYWRhY2I4ODlkNGU1YmEzZmY4MzVhMjRmMmUxYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.tJylBtiFApxzckVznO5lyBd3uPmd76sraV0d6UcTMtk)
My CliWrap helper class
Beta Was this translation helpful? Give feedback.
All reactions