From b4376ef995e1fc95a8973cb0bb692ee2233eefa4 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sun, 8 Jun 2014 23:34:35 -0300 Subject: [PATCH] command/sudoers: Use Vagrant's ruby for the sudoers file This makes things work on systems that don't have a global ruby installation in place and fix GH-289 --- CHANGELOG.md | 4 ++++ lib/vagrant-lxc/command/sudoers.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82fb244..16a07b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,12 @@ IMPROVEMENTS: BUG FIXES: - Escape space characters for synced folders [[GH-291]] + - Use Vagrant's ruby on the sudoers file so that it works on systems that don't + have a global ruby installation [[GH-289]] [GH-291]: https://github.com/fgrehm/vagrant-lxc/issues/291 +[GH-289]: https://github.com/fgrehm/vagrant-lxc/issues/289 + ## [1.0.0.alpha.2](https://github.com/fgrehm/vagrant-lxc/compare/v1.0.0.alpha.1...v1.0.0.alpha.2) (May 13, 2014) diff --git a/lib/vagrant-lxc/command/sudoers.rb b/lib/vagrant-lxc/command/sudoers.rb index 311358e..bfc9ce0 100644 --- a/lib/vagrant-lxc/command/sudoers.rb +++ b/lib/vagrant-lxc/command/sudoers.rb @@ -44,7 +44,7 @@ module Vagrant # lands into core def create_wrapper! wrapper = Tempfile.new('lxc-wrapper').tap do |file| - file.puts "#!/usr/bin/env ruby" + file.puts "#!/opt/vagrant/embedded/bin/ruby" file.puts "# Automatically created by vagrant-lxc" file.puts <<-EOF class Whitelist