From ce8902574c63ba5c578d93f9b4b58a6bbff28b3e Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 2 Mar 2013 00:03:48 -0300 Subject: [PATCH] Fix public key path --- lib/vagrant-lxc/container.rb | 2 +- spec/unit/container_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-lxc/container.rb b/lib/vagrant-lxc/container.rb index f321dd9..cec7cdd 100644 --- a/lib/vagrant-lxc/container.rb +++ b/lib/vagrant-lxc/container.rb @@ -22,7 +22,7 @@ module Vagrant def create # FIXME: Ruby 1.8 users dont have SecureRandom machine_id = SecureRandom.hex(6) - public_key = Vagrant.source_root.join('../keys/vagrant.pub').expand_path.to_s + public_key = Vagrant.source_root.join('keys', 'vagrant.pub').expand_path.to_s log, status = lxc :create, '--template', 'ubuntu-cloud', '--name', machine_id, '--', '-S', public_key # TODO: Handle errors machine_id diff --git a/spec/unit/container_spec.rb b/spec/unit/container_spec.rb index 863349e..0308d5e 100644 --- a/spec/unit/container_spec.rb +++ b/spec/unit/container_spec.rb @@ -49,7 +49,7 @@ describe Vagrant::LXC::Container do describe 'creation' do let(:new_machine_id) { 'random-machine-id' } - let(:public_key_path) { Vagrant.source_root.join('..', 'keys', 'vagrant.pub').expand_path.to_s } + let(:public_key_path) { Vagrant.source_root.join('keys', 'vagrant.pub').expand_path.to_s } before do subject.stub(:lxc)