From 471dc2dc7de8a567f37a0318a8ad581b0e296135 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 9 Aug 2013 11:42:18 -0700 Subject: [PATCH] core: strip newlines off of IDs [GH-2024] --- CHANGELOG.md | 1 + lib/vagrant/machine.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a16a74c1..956dfbba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ IMPROVEMENTS: BUG FIXES: + - core: strip newlines off of ID file values [GH-2024] - guests/debian: Force bring up eth0. Fixes hangs on setting hostname. [GH-2026] - hosts/fedora: properly detect later CentOS versions. [GH-2008] diff --git a/lib/vagrant/machine.rb b/lib/vagrant/machine.rb index 632dcf9a5..8147bb346 100644 --- a/lib/vagrant/machine.rb +++ b/lib/vagrant/machine.rb @@ -108,7 +108,7 @@ module Vagrant # Read the id file from the data directory if it exists as the # ID for the pre-existing physical representation of this machine. id_file = @data_dir.join("id") - @id = id_file.read if id_file.file? + @id = id_file.read.chomp if id_file.file? end # Initializes the provider last so that it has access to all the