Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Patches Vagrant bug #7616
#!/bin/bash
# Patches a Vagrant permissions-creating script that breaks assigning groups
# that don't have a matching user. See Vagrant bug #7616
# Thanks to @Jc-L for the patch
paths=( "/usr/share/vagrant/" "/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/" )
for p in "${paths[@]}"; do
if [ -d "$p" ]; then
PREFIX="$p"
fi
done
if [ -z "$PREFIX" ]; then
echo "Vagrant installation not found!"
exit 1
fi
read -r -d '' PATCH <<'PATCH'
--- a/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb Wed Aug 10 15:29:59 2016
+++ b/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb Wed Aug 10 15:30:47 2016
@@ -11,7 +11,7 @@
def self.mount_virtualbox_shared_folder(machine, name, guestpath, options)
guest_path = Shellwords.escape(guestpath)
- mount_commands = ["set -e"]
+ mount_commands = [""]
if options[:owner].is_a? Integer
mount_uid = options[:owner]
PATCH
cd $PREFIX
echo "$PATCH" | patch -bN -p1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment