Better use sudo externally

pull/402/head
Dmitry Ilyin 2022-08-24 11:41:00 +03:00
parent ef73c4335c
commit e3c7c66b96
2 changed files with 10 additions and 6 deletions

View File

@ -82,7 +82,7 @@ jobs:
- name: Install build dependencies - name: Install build dependencies
if: env.NEED == 'true' if: env.NEED == 'true'
run: | run: |
make install-deps sudo make install-deps
if [ ! -z "$ACT" ]; then if [ ! -z "$ACT" ]; then
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV
else else
@ -284,7 +284,7 @@ jobs:
- name: Install build dependencies - name: Install build dependencies
run: | run: |
make install-deps sudo make install-deps
ls -l deps || true ls -l deps || true
if [ ! -z "$ACT" ]; then if [ ! -z "$ACT" ]; then
echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV echo "FORCE_UNSAFE_CONFIGURE=1" >> $GITHUB_ENV

View File

@ -56,10 +56,14 @@ $(BR_DIR): $(ROOT_DIR)/buildroot-$(BR_VER).tar.gz
install-deps: install-deps:
if [ ! -f /.dockerenv ]; then SUDO=sudo; fi ifneq ($(shell id -u), 0)
DEBIAN_FRONTEND=noninteractive $(SUDO) apt-get update && \ @echo "You must be root to perform this action."
$(SUDO) apt-get -y install \ else
build-essential git make libncurses-dev wget curl cpio rsync bc unzip DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get -y install \
build-essential git make libncurses-dev wget curl \
cpio rsync bc unzip file
endif
%_info: %_info: