Project

General

Profile

« Previous | Next » 

Revision 14848

lib/sh/util.sh: sudo(): moved addition of -E (which should always happen) to separate, overridden sudo() function

View differences:

trunk/lib/sh/util.sh
487 487

  
488 488
is_root="$(test "$(id -un)" = root; exit2bool)"
489 489

  
490
function sudo() { self -E "$@"; }
491

  
492
func_override sudo__basic
490 493
function sudo()
491 494
{
492 495
	echo_func
493
	if is_callable "$1"; then set -- -E env PATH="$PATH" "$@"; fi # preserve env
494
	self "$@"
496
	if is_callable "$1"; then set -- env PATH="$PATH" "$@"; fi # preserve PATH
497
	sudo__basic "$@"
495 498
}
496 499
alias sudo='"sudo" ' # last space alias-expands next word
497 500

  

Also available in: Unified diff