I’m not sure if this is a FinalBuilder or ActionStudio bug or not a bug at all, but here goes:
I have an action that calls a program (PowerShell) that can potentionally spit out a lot of long lines of text. This output is captured and displayed in the FB build log when the action is run. The problem is that lines in the build log are all truncated at around 80 chars.
At first I thought this was a display issue, so I tried storing the output into a variable and later display the string using MessageBox and save it to a text file. Same thing again: output truncated at 80 characters. So it didn’t seem to have anything to do with the build log. If I run the program stand-alone, there is no truncation.
Now, this could mean one of three things: 1) the capture within ActionStudio has some kind of limit to it or 2) the transfer of data from the action to the rest of the system has some size limit to it or 3) PowerShell is somehow limiting its output when called from another program
So the question is: does ActionStudio or FB in some way limit the length of the strings captured or should I start checking if powershell might be the culprit?
Hi Peter,
FB and ActionStudio don’t have any limits of line length, so my first guess would be that powershell is assuming that the process calling it only can deal with 80 columns. Maybe there is some switch to change this? (the sql tools are similar, and the width can be changed via certain parameters).
.t8
I was supecting something like that as well. Good to have it verified.
I’ll try to find some info on Powershell, then…
OK, this is what I’ve come up with so far:
1. Changing the display properties for cmd.exe and/or powershell.exe doesn’t seem to help (right-click caption, select Properties, select Layout tab, change display width)
2. The Out-File cmdlet has a -width property but then I would have suppress logging while the command is running, pipe to a tmp file, read the content back and post to build log manually. I would like to avoid this obviously
3. Out-String also has a -width property and used with the -stream property the output is not truncated to 80 chars although there seem to be an inordinate number of empty rows. This seem to be a workable solution for the time being.
PS still truncates output based on formatting settings in one of its ps1xml files, but at least the total length of the output can be changed with these commands.
It seems though as FB still wraps the output at 80 chars or is it PS doing it (see screenshots - the first is with Out-String -stream -width 200 and the second without any formatting at all)?
OK, I’ve found a temporary solution: start powershell.exe from the powershell folder (not the shortcut on your start menu/desktop!). Change the Layout properties there. Save settings for all windows with the same name.
Now it works in FB as well.
Although this works, I would prefer a method that I can control from within the action. I’ve been asking around on NG’s and blogs so hopefully someone has a useable solution.
Stay tuned!
If it is a problem of console window size, you can use the mode command to change that programatically.
MODE CON COLS=xx LINES=yy
Cols=Columns, Lines=lines
Standard is 80x25, but I usually run my consoles at 128x50
Now if you figure out a way to get VSS to display at more than 80 colums, please let me know! (it seems to be hard-coded at 80 cols, regardless of your console size)
I'm not sure if you can go more than 80, but you can specify the ColumnWidth in the SS.INI or srcsafe.ini file. The syntax is:
Columns (CL) = x
hth.