From 05b13179dac59d6465cc60af0e885a908078cbe2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 22 Jan 2021 18:18:49 +0100 Subject: [PATCH] Update _common.sh --- scripts/_common.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 64d5b69..a68592d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -18,16 +18,3 @@ nodejs_version="12" # FUTURE OFFICIAL HELPERS #================================================= - -# Execute a command as another user -# usage: ynh_exec_as USER COMMAND [ARG ...] -ynh_exec_as() { - local USER=$1 - shift 1 - - if [[ $USER = $(whoami) ]]; then - eval "$@" - else - sudo -u "$USER" "$@" - fi -} \ No newline at end of file