vagrant: Use id -g for finding a user's group.

On OSX, the user id and group id don't match.  So while the previous
code was always wrong, it produced incorrect output there.  We can fix
this by replacing `whoami` with `id -g` for finding the current user's
group ID.
This commit is contained in:
Puneeth Chaganti
2018-11-01 10:08:29 +05:30
committed by Tim Abbott
parent 1490653e42
commit 19990b06e9
3 changed files with 3 additions and 3 deletions

2
Vagrantfile vendored
View File

@@ -202,7 +202,7 @@ if [ ! -w /srv/zulip ]; then
# sudo is required since our uid is not 1000
echo ' vagrant halt -f'
echo ' rm -rf /PATH/TO/ZULIP/CLONE/.vagrant'
echo ' sudo chown -R 1000:$(whoami) /PATH/TO/ZULIP/CLONE'
echo ' sudo chown -R 1000:$(id -g) /PATH/TO/ZULIP/CLONE'
echo "Replace /PATH/TO/ZULIP/CLONE with the path to where zulip code is cloned."
echo "You can resume setting up your vagrant environment by running:"
echo " vagrant up"