From 3b63e1f8b839b0b3fb433e10036328fdb6da9b3d Mon Sep 17 00:00:00 2001 From: Yufan Lou Date: Sat, 10 Jun 2017 15:15:43 +0800 Subject: [PATCH 1/2] Add chomp to lookup gid Fixes #8664 --- plugins/synced_folders/unix_mount_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/synced_folders/unix_mount_helpers.rb b/plugins/synced_folders/unix_mount_helpers.rb index 97d77975a..6d062c5b7 100644 --- a/plugins/synced_folders/unix_mount_helpers.rb +++ b/plugins/synced_folders/unix_mount_helpers.rb @@ -50,7 +50,7 @@ module VagrantPlugins command: gid_command, output: output[:stderr] ) { |type, data| output[type] << data if output[type] } - mount_gid = output[:stdout].split(':').at(2) + mount_gid = output[:stdout].split(':').at(2).chomp self.class_variable_get(:@@logger).debug("Owner group ID (lookup): #{options[:group]} -> #{mount_gid}") rescue Vagrant::Errors::VirtualBoxMountFailed if options[:owner] == options[:group] From b8bad54ad91f8df369d7f41ee86e10ab0120b5e0 Mon Sep 17 00:00:00 2001 From: Yufan Lou Date: Fri, 16 Jun 2017 11:22:56 +0800 Subject: [PATCH 2/2] Fix nil case --- plugins/synced_folders/unix_mount_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/synced_folders/unix_mount_helpers.rb b/plugins/synced_folders/unix_mount_helpers.rb index 6d062c5b7..3ba93cde1 100644 --- a/plugins/synced_folders/unix_mount_helpers.rb +++ b/plugins/synced_folders/unix_mount_helpers.rb @@ -50,7 +50,7 @@ module VagrantPlugins command: gid_command, output: output[:stderr] ) { |type, data| output[type] << data if output[type] } - mount_gid = output[:stdout].split(':').at(2).chomp + mount_gid = output[:stdout].split(':').at(2).to_s.chomp self.class_variable_get(:@@logger).debug("Owner group ID (lookup): #{options[:group]} -> #{mount_gid}") rescue Vagrant::Errors::VirtualBoxMountFailed if options[:owner] == options[:group]