<< Back to previous view |
[QB-1605] util.readOutput does not execute in specified working directory in ver 4.0.50
|
|
Status: | Resolved |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | 4.0.50 |
Fix Version/s: | 5.0.15 |
Type: | Bug | Priority: | Major |
Reporter: | shani hayoun | Assigned To: | Robin Shen |
Resolution: | Fixed | Votes: | 0 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown |
Description |
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 |
Comments |
Comment by 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) |