[build] docker-sonic-mgmt replace USER by whoami (#9702)
This commit is contained in:
parent
9b795dbf09
commit
94b778c39b
@ -17,7 +17,7 @@ REPR_MIRROR_URL_PATTERN='http:\/\/packages.trafficmanager.net\/debian'
|
||||
|
||||
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