run rvm as user, not as root
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								13fc5aa8f5
							
						
					
				
			
			
				commit
				
					
						d97f6794d0
					
				
			
		
					 2 changed files with 4 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -32,14 +32,12 @@ state_should="$(cat "$__object/parameter/state")"
 | 
			
		|||
case "$state_should" in
 | 
			
		||||
    present)
 | 
			
		||||
        cat << DONE
 | 
			
		||||
su - "$user" -c "source \"\\\$HOME/.rvm/scripts/rvm\"
 | 
			
		||||
rvm use $gemset; gem install $gem"
 | 
			
		||||
su - "$user" -c "source \"\\\$HOME/.rvm/scripts/rvm; rvm use $gemset; gem install $gem"\"
 | 
			
		||||
DONE
 | 
			
		||||
    ;;
 | 
			
		||||
    absent)
 | 
			
		||||
        cat << DONE
 | 
			
		||||
su - "$user" -c "source \"\\\$HOME/.rvm/scripts/rvm\"
 | 
			
		||||
rvm use $gemset; gem uninstall $gem"
 | 
			
		||||
su - "$user" -c "source \"\\\$HOME/.rvm/scripts/rvm; rvm use $gemset; gem uninstall $gem"\"
 | 
			
		||||
DONE
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,7 +7,8 @@ Changelog
 | 
			
		|||
2.1.0pre6:
 | 
			
		||||
	* New Example: Turn remote calls into local calls (used for unittesting)
 | 
			
		||||
	* Core: Export PYTHONPATH, it's also needed by emulator
 | 
			
		||||
	* Type __rvm_ruby: Add clean package dependencies
 | 
			
		||||
	* Bugfix Type __rvm_ruby: Add clean package dependencies
 | 
			
		||||
	* Bugfix Type __rvm_gem: Run rvm as user, not as root
 | 
			
		||||
 | 
			
		||||
2.1.0pre5: 2012-11-01
 | 
			
		||||
	* Core: First round of tests updated to work with multiple configuration directories
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue