Fix return codes for some void wrapper functions
This commit is contained in:
		
							parent
							
								
									205558b999
								
							
						
					
					
						commit
						e73ce2bd18
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		
							
								
								
									
										10
									
								
								aliases/void
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								aliases/void
									
										
									
									
									
								
							|  | @ -23,11 +23,11 @@ xqn() { | ||||||
| alias xfiles="xbps-query -f" | alias xfiles="xbps-query -f" | ||||||
| 
 | 
 | ||||||
| xbps-install() { | xbps-install() { | ||||||
| 	sudo script --return --quiet -c "/usr/bin/xbps-install $*" /dev/null \ | 	local logfile=$(mktemp) | ||||||
| 		| tee /dev/stderr \ | 	sudo script --return --quiet -c "/usr/bin/xbps-install $*" $logfile | ||||||
| 		| grep -oP ".*(?=: post-install message)" \ | 	local ret=$? | ||||||
|  | 	grep -oP ".*(?=: post-install message)" < $logfile \ | ||||||
| 		| ifne xargs -L 1 xbps-query -p install-msg | 		| ifne xargs -L 1 xbps-query -p install-msg | ||||||
| 	ret=$? |  | ||||||
| 	hash -r | 	hash -r | ||||||
| 	return $ret | 	return $ret | ||||||
| } | } | ||||||
|  | @ -52,11 +52,13 @@ xowner() { | ||||||
| 
 | 
 | ||||||
| sv() { | sv() { | ||||||
| 	command sv "$@" | 	command sv "$@" | ||||||
|  | 	ret=$? | ||||||
| 	if [[ "$1" == "up" ]]; then | 	if [[ "$1" == "up" ]]; then | ||||||
| 		shift | 		shift | ||||||
| 		sleep 0.5 | 		sleep 0.5 | ||||||
| 		command sv check "$@" | 		command sv check "$@" | ||||||
| 	fi | 	fi | ||||||
|  | 	return $ret | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| sv-manage() { | sv-manage() { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 crater2150
						crater2150