Open Ostrzy opened 9 years ago
Hey, thanks for the commit! Weird, I thought I fixed the collect
issue with a previous commit. I'll have to go digging.
What shell are you using? I'm not entirely sure whether shell escaping is standard or not, that'd be my only concern.
Oh, and... There are no tests. Yet. >.>
I am using zsh, but when I'm trying to pass LOCAL(username)
as an option in bash I also get an error. In both cases applying '
solves problem. I can remove this, but then for some identifiers containing forbidden characters or spaces there will be some escaping needed:
Sauce.config do |config|
tunnel_name = "LOCAL(#{ENV['SAUCE_USERNAME']})"
config[:connect_options] = { tunnel_identifier: "'#{tunnel_name}'" }
config["tunnel-identifier"] = tunnel_name
end
Currently when some options are passed to Sauce Connect using
it is simply ignored because only first option (which is always
readyfile
) is return in the first block execution ofcollect
. Additionally I've added some basic escaping for passed parameters using'
- in my case tunnel name wasLOCAL(username)
and it was simply failing when passed directly to shell as an option. I wanted to create some spec for that, but didn't have any good idea how to test it.