mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	vagrant: Graciously fail when vagrant user can't write to /srv/zulip.
Fixes #1410.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							7929bf5c76
						
					
				
				
					commit
					7bda069ced
				
			
							
								
								
									
										13
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								Vagrantfile
									
									
									
									
										vendored
									
									
								
							@@ -191,6 +191,19 @@ export SKIP_VENV_SHELL_WARNING=1
 | 
			
		||||
# message after a successful run.
 | 
			
		||||
set +x
 | 
			
		||||
 | 
			
		||||
# Check if the zulip directory is writable
 | 
			
		||||
if [ ! -w /srv/zulip ]; then
 | 
			
		||||
    echo "The vagrant user is unable to write to the zulip directory."
 | 
			
		||||
    echo "To fix this, run the following commands on the host machine:"
 | 
			
		||||
    # 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 "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"
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
# Provision the development environment
 | 
			
		||||
ln -nsf /srv/zulip ~/zulip
 | 
			
		||||
/srv/zulip/tools/provision
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user