Ensure options[:mount_options] is defined before checking if it includes key

This commit is contained in:
Michael Hahn 2014-02-06 14:06:47 -08:00
parent 3631b250b7
commit d68544a906
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ module VagrantPlugins
# Chown the directory to the proper user. We skip this if the
# mount options contained a readonly flag, because it won't work.
if !options[:mount_options].include?("ro")
if options[:mount_options] and !options[:mount_options].include?("ro")
chown_commands = []
chown_commands << "chown #{mount_uid}:#{mount_gid} #{expanded_guest_path}"
chown_commands << "chown #{mount_uid}:#{mount_gid_old} #{expanded_guest_path}"