History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-1605
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: shani hayoun
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

util.readOutput does not execute in specified working directory in ver 4.0.50

Created: 10/Apr/13 10:24 AM   Updated: 11/Apr/13 12:48 AM
Component/s: None
Affects Version/s: 4.0.50
Fix Version/s: 5.0.15

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide

following QA-1254 , util.readOutput(java.lang.String, java.io.File) does not execute in the working directory specified by the java.io.File parameter. It always executes in the "bin" installation path.


One more question -
Do you know any other way (not util.readOutput ) to set variable with return script value? Do you have wxamples for util.readOutput ?

Thanks,
Shani

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [11/Apr/13 12:48 AM]
I verified this to be working in QB5. To set variable value to output of some command:
groovy:
def workingDir = new File(configuration.workspaceDir, "some sub dir")
vars.get("someVar").setValue(util.readOutput("some command", workingDir))

Or you may do without using util.readOutput like below:

groovy:
vars.get("someVar").setValue("some command".execute().text)