-
Notifications
You must be signed in to change notification settings - Fork 155
Conversation
Kept getting ``` /Users/peterso/Projects/vagrant-rackspace/lib/vagrant-rackspace/action/pre_provision_script.rb:25:in `read': no implicit conversion of Array into String (TypeError) from /Users/peterso/Projects/vagrant-rackspace/lib/vagrant-rackspace/action/pre_provision_script.rb:25:in `call' from /opt/rubies/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/vagrant-efd1d5e11bfc/lib/vagrant/action/warden.rb:34:in `call' ```
I made a mistake when I was describing the workaround in #48. I thought it was using personality files like I plan to do for windows, but the workaround in #48 is actually using Fog's SSH/SCP classes. The reason I used Fog's classes at the time was because Vagrant didn't support PTY then but Fog did. Now that Vagrant supports PTY its probably better to use Vagrant directly. Could you try ripping out all the def call(env)
env[:machine].communicate.sudo "sed -i'.bk' -e 's/^\(Defaults\s\+requiretty\)/# \1/' /etc/sudoers"
@app.call(env) # This was the *first* line in the original PR, but I think should have been last
end |
Cool, I'm changing it to the easier syntax now. However I had to do: def call(env)
@app.call(env)
env[:machine].communicate.sudo "sed -i'.bk' -e 's/^\(Defaults\s\+requiretty\)/# \1/' /etc/sudoers"
end Because otherwise it'd fail with `The provider for this Vagrant-managed machine is reporting that it |
As Vagrant now uses tty for it's sudo commands, we don't have to fudge it with fog! 👍
Issues with double quotes creating weird escapes
Otherwise rsync will fail!
@maxlinc any thoughts? 👍 |
@maxlinc any thoughts on this? |
@smashwilson #124 was an alternative to this, so this PR can be closed. @petems - You should be able to use the new rs.init_script = 'sed -i\'.bk\' -e \'s/^\(Defaults\s\+requiretty\)/# \1/\' /etc/sudoers' If you'd a more convient, easier-to-remember solution I would be okay w/ a PR that adds support for pre-definined init_scripts for known workarounds, e.g.: rs.init_script = :disable_requiretty |
@maxlinc Aye aye. |
@maxlinc Cool, I can do that 👍 |
Discussion here: #115
tty stuff still affects rsync