mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
Fix
This commit is contained in:
parent
3cdaee04af
commit
4cd18e981e
2 changed files with 15 additions and 2 deletions
|
@ -16,4 +16,17 @@ nodejs_version="12"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# FUTURE OFFICIAL HELPERS
|
# 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
|
||||||
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ then
|
||||||
#ynh_setup_source --dest_dir="$final_path"
|
#ynh_setup_source --dest_dir="$final_path"
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
bower update
|
ynh_exec_warn_less ynh_exec_as $app bower update
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue