Project

General

Profile

« Previous | Next » 

Revision 14869

bugfix: lib/sh/util.sh: become_sudo don't continue running function after self_sudo finishes

View differences:

trunk/lib/sh/util.sh
507 507

  
508 508
# usage: func() { become_sudo; __; } # for funcs that run multiple sudo commands
509 509
alias self_sudo='sudo "${FUNCNAME%%__*}" "$@"'
510
alias become_sudo='if ! test "$is_root"; then self_sudo; fi'
510
alias become_sudo='if ! test "$is_root"; then self_sudo; return 0; fi'
511
	# return: don't continue running function after self_sudo finishes
511 512

  
512 513

  
513 514
#### exceptions

Also available in: Unified diff