[build] docker-sonic-mgmt replace USER by whoami (#9702)
This commit is contained in:
parent
ee84ba81ed
commit
f5c876edf3
@ -18,7 +18,7 @@ DPKG_INSTALLTION_LOCK_FILE=/tmp/.dpkg_installation.lock
|
||||
|
||||
URL_PREFIX=$(echo "${PACKAGE_URL_PREFIX}" | sed -E "s#(//[^/]*/).*#\1#")
|
||||
|
||||
if [ $USER != 'root' ] && [ -n $(which sudo) ];then
|
||||
if [ "$(whoami)" != "root" ] && [ -n "$(which sudo)" ];then
|
||||
SUDO=sudo
|
||||
else
|
||||
SUDO=''
|
||||
|
Loading…
Reference in New Issue
Block a user