Get local data path from project

This commit is contained in:
sophia 2021-08-10 17:13:31 -04:00 committed by Paul Hinze
parent bc365ab796
commit 68aa184bee
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
3 changed files with 9 additions and 5 deletions

View File

@ -18,6 +18,7 @@ module Vagrant
end
super
@logger = Log4r::Logger.new("vagrant::environment")
@local_data_path = Pathname.new(@client.local_data_path())
end
# Gets a target (machine) by name

View File

@ -76,11 +76,6 @@ module VagrantPlugins
Pathname.new(@client.data_dir(req).data_dir)
end
# TODO: local data path comes from the project
def get_local_data_path
#TODO
end
def get_provider
req = Google::Protobuf::Empty.new
@client.provider(req)

View File

@ -17,6 +17,14 @@ module VagrantPlugins
self.new(conn.to_s, broker)
end
# Gets the local data path
# return [String]
def get_local_data_path
req = Google::Protobuf::Empty.new
resp = @client.local_data(req)
return resp.path
end
# Returns a machine client for the given name
# return [VagrantPlugins::CommandServe::Client::Machine]
def target(name)