Command Line Runner - Issues with quotes
Hi,
I'm trying to execute a ruby script through the command line runner using rvm and when using the command line runner it is doing something weird with the quotes. The way I have the runner configured is the executable is set to "ruby" and the parameters is set to this:
query_tc_artifacts.rb --artifact_path="flashlog.txt" --project_filter="^Rehab" --build_filter="Player - API Automation Tests - JS" --metric_pattern="Performance trace on template load \(time: (\d+)" --metric_suffix="player.load" --days_ago 2 --graph_metrics
The build fails with this message:
/home/buildacct/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/uri/common.rb:156:in `split': bad URI(is not URI?): http://tcbuild01.qanet.local:8111/guestAuth/repository/download/bt123780/220400:id/"origin/catalina.out" (URI::InvalidURIError)
Looking at the failure above teamcity seems to wrap the value again with another set of quotes or something. When I go on to the agent and run the same command it works without an issue. It also works if I put everything into a custom script instead of using the Executable with parameters option. Any help would be great, is there a better approach to this?
Thanks,
Jay
Please sign in to leave a comment.
For this reason, we keep everything in a script and check in the build script.
This isn't a bad idea if you think about it.
You get to:
I could checkin a script but the ruby script I'm calling is a generic script I'd rather just call it directly as we call it a few different ways, I'd rather not have to create multiple wrapper scripts. The problem is I'd like to know why extra quotes are being added, sounds like a bug to me.
Hi Jason.
Yes, that's a bug filled at TW-7964.
Using a custom script in the build step settings is the the most reliable workaround so far.
Michael