mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	* do not install with uv for now - fixes #8789
#8742 #8495 #8494
* Ensure errors are raised if install / update fails
(cherry picked from commit d7939efaa9)
Co-authored-by: Matthias Mair <code@mjmair.com>
			
			
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							4f7a12bd70
						
					
				
				
					commit
					d42e3087a8
				
			@@ -292,14 +292,15 @@ function stop_inventree() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function update_or_install() {
 | 
			
		||||
  set -e
 | 
			
		||||
 | 
			
		||||
  # Set permissions so app user can write there
 | 
			
		||||
  chown ${APP_USER}:${APP_GROUP} ${APP_HOME} -R
 | 
			
		||||
 | 
			
		||||
  # Run update as app user
 | 
			
		||||
  echo "# POI12| Updating InvenTree"
 | 
			
		||||
  sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && pip install uv wheel"
 | 
			
		||||
  sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke update --uv | sed -e 's/^/# POI12| u | /;'"
 | 
			
		||||
  sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && pip install wheel"
 | 
			
		||||
  sudo -u ${APP_USER} --preserve-env=$SETUP_ENVS bash -c "cd ${APP_HOME} && invoke update | sed -e 's/^/# POI12| u | /;'"
 | 
			
		||||
 | 
			
		||||
  # Make sure permissions are correct again
 | 
			
		||||
  echo "# POI12| Set permissions for data dir and media: ${DATA_DIR}"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user