Don't replace the DEFAULT_SERVER_URL unless required

Trying to replace the string on newer versions of vagrant fails with a
'RuntimeError: can't modify frozen String' error. On newer versions of Vagrant,
the server URL is correct already.
This commit is contained in:
Puneeth Chaganti 2018-03-19 10:42:24 +05:30 committed by Tim Abbott
parent a3bb819e4c
commit 7929bf5c76
1 changed files with 3 additions and 1 deletions

2
Vagrantfile vendored
View File

@ -62,7 +62,9 @@ end
# atlas.hashicorp.com, which means that removal broke the fetching and
# updating of boxes (since the old URL doesn't work). See
# https://github.com/hashicorp/vagrant/issues/9442
if Vagrant::DEFAULT_SERVER_URL == "atlas.hashicorp.com"
Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')
end
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|