Skip to content

Commit

Permalink
Update Vagrant#login_command to return a LoginCommand object.
Browse files Browse the repository at this point in the history
This is the upstream API update needed to change directory before
issuing the SSH command to connect to a Test Kitchen controlled Vagrant
VM. Coolbeans.
  • Loading branch information
fnichol committed Mar 23, 2013
1 parent 6ffd386 commit 45809df
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/kitchen/driver/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ def destroy(state)

def login_command(state)
create_vagrantfile(state)
FileUtils.cd(vagrant_root, :verbose => logger.debug? ? true : false)
%W{vagrant ssh}
LoginCommand.new(%W{vagrant ssh}, :chdir => vagrant_root)
end

protected
Expand All @@ -85,9 +84,7 @@ def ssh(ssh_args, cmd)

def run(cmd)
cmd = "echo #{cmd}" if config[:dry_run]
FileUtils.cd(vagrant_root, :verbose => logger.debug? ? true : false) do
run_command(cmd)
end
run_command(cmd, :cwd => vagrant_root)
end

def vagrant_root
Expand Down

0 comments on commit 45809df

Please sign in to comment.