> I'd encourage you to submit a patch to chefspec to support script/bash resources if you're able.I like the idea too but I'm not really able to (just not smart enough to be honest)
What I was initially looking for was something likeexpect(chef_run).to execute_bash(command)
But I don't think that exists right?
On Tue, Jul 9, 2013 at 7:51 AM, Daniel DeLeo < ');" target="_blank"> > wrote:
On Monday, July 8, 2013 at 3:47 PM, Rudi wrote:
Very nice! Thanks man.On Tue, Jul 9, 2013 at 6:46 AM, John Dewey < ');" target="_blank"> > wrote:
Right, thats why you want to source the rvm script, before calling rvm.code <<-EOH.gsub(/^\s+/, '')source ~/.rvm/scripts/rvmrvm use ruby-1.9.2-p290bundle --verboseEOHcommand = <<-EOH.gsub(/^\s+/, '')source ~/.rvm/scripts/rvmrvm use ruby-1.9.2-p290bundle --verboseEOHexpect(chef_run).to execute_command(command)On Monday, July 8, 2013 at 3:39 PM, Rudi wrote:
Hey John,> can probably switch back to executeThe reason I left was I needed to pass in the "--login" flag. Without this it erred not being able to see rvm (non apt package).The fact that an execute resource runs bin/sh as an intermediate step is an implementation detail (admittedly, one we're unlikely to change), so adding the `--login` flag to the bash resource is better chef code, in my opinion.I'd encourage you to submit a patch to chefspec to support script/bash resources if you're able.--Daniel DeLeo
Archive powered by MHonArc 2.6.16.