From 92104fec729aab897ade2b4b21a4c7311876f28c Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Fri, 22 Jul 2016 14:39:44 +0100 Subject: [PATCH] Use match instead of start_with --- lib/vagrant/environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index a602e133b..daf4e6013 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -161,7 +161,7 @@ module Vagrant # depending on whether it starts with the "{}" placeholder. Otherwise, # we use the default which is expanded relative to the root path. opts[:local_data_path] ||= ENV["VAGRANT_DOTFILE_PATH"] if !opts[:child] - if opts[:local_data_path] && opts[:local_data_path].start_with?("{}") && !root_path.nil? + if opts[:local_data_path] && opts[:local_data_path].match("^\{\}") && !root_path.nil? opts[:local_data_path] = File.join(root_path, opts[:local_data_path].sub(/^\{\}/, '')) end opts[:local_data_path] ||= root_path.join(DEFAULT_LOCAL_DATA) if !root_path.nil?