mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	setup_venv: Give up if virtualenv-clone isn't working.
virtualenv-clone can sometimes fail if the old virtualenv is broken; in that case, we can just make a new one.
This commit is contained in:
		@@ -136,9 +136,13 @@ def try_to_copy_venv(venv_path, new_packages):
 | 
			
		||||
        except Exception:
 | 
			
		||||
            # Virtualenv-clone is not installed. Install it and try running
 | 
			
		||||
            # the command again.
 | 
			
		||||
            run("{}/bin/pip install --no-deps virtualenv-clone".format(
 | 
			
		||||
                source_venv_path).split())
 | 
			
		||||
            run(cmd)
 | 
			
		||||
            try:
 | 
			
		||||
                run("{}/bin/pip install --no-deps virtualenv-clone".format(
 | 
			
		||||
                    source_venv_path).split())
 | 
			
		||||
                run(cmd)
 | 
			
		||||
            except Exception:
 | 
			
		||||
                # virtualenv-clone isn't working, so just make a new venv
 | 
			
		||||
                return False
 | 
			
		||||
 | 
			
		||||
        run(["sudo", "chown", "-R",
 | 
			
		||||
             "{}:{}".format(os.getuid(), os.getgid()), venv_path])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user