From 7929bf5c763231502c788bd5edbbd9756d1e0085 Mon Sep 17 00:00:00 2001 From: Puneeth Chaganti Date: Mon, 19 Mar 2018 10:42:24 +0530 Subject: [PATCH] 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. --- Vagrantfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 90ce959666..a43432d159 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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 -Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com') +if Vagrant::DEFAULT_SERVER_URL == "atlas.hashicorp.com" + Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com') +end Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|